diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ef5085379..4bfc6c60b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,15 +1,12 @@ name: Test on: + schedule: + - cron: '0 * * * *' pull_request: - types: - - opened - - reopened - - synchronize push: branches: - - main - - master + - '*.*.x' tags: - '*' diff --git a/betty/model/__init__.py b/betty/model/__init__.py index 3c4f49c61..bd7edabe9 100644 --- a/betty/model/__init__.py +++ b/betty/model/__init__.py @@ -428,8 +428,8 @@ def _getitem_by_entity_type(self, entity_type: Type[EntityT]) -> SingleTypeEntit def _getitem_by_entity_type_name(self, entity_type_name: str) -> SingleTypeEntityCollection[Entity]: return self._get_collection(get_entity_type(entity_type_name)) - def _getitem_by_index(self, index: int) -> EntityT: - return cast(EntityT, reduce(operator.add, self._collections.values(), SingleTypeEntityCollection(Entity))[index]) + def _getitem_by_index(self, index: int) -> Entity: + return reduce(operator.add, self._collections.values(), SingleTypeEntityCollection(Entity))[index] def _getitem_by_indices(self, indices: slice) -> SingleTypeEntityCollection[Entity]: return reduce(operator.add, self._collections.values(), SingleTypeEntityCollection(Entity))[indices]