Skip to content

Commit

Permalink
Merge pull request bartfeenstra#903 from bartfeenstra/fix-test-failures
Browse files Browse the repository at this point in the history
Fix test failures caused by changes in recent releases of our dependencies, and enable periodic testing to discover regressions early
  • Loading branch information
bartfeenstra authored Nov 3, 2022
2 parents 18a9142 + 917dfdc commit d69c01e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
name: Test

on:
schedule:
- cron: '0 * * * *'
pull_request:
types:
- opened
- reopened
- synchronize
push:
branches:
- main
- master
- '*.*.x'
tags:
- '*'

Expand Down
4 changes: 2 additions & 2 deletions betty/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit d69c01e

Please sign in to comment.