Merge pull request #193 from kra-mo/geoffreys-dev-branch

Fix store length method
This commit is contained in:
Geoffrey Coulaud
2023-09-26 14:33:23 +02:00
committed by GitHub

View File

@@ -60,7 +60,7 @@ class Store:
def __len__(self) -> int:
"""Get the number of games in the store with the `len` builtin"""
return sum(len(source_mapping) for source_mapping in self.source_games)
return sum(len(source_mapping) for source_mapping in self.source_games.values())
def __getitem__(self, game_id: str) -> Game:
"""Get a game by its id with `store["game_id_goes_here"]`"""