mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
CC: Add Assert to Catch Old Datapackage Lookup API (#5131)
This commit is contained in:
@@ -201,6 +201,7 @@ class CommonContext:
|
||||
|
||||
# noinspection PyTypeChecker
|
||||
def __getitem__(self, key: str) -> typing.Mapping[int, str]:
|
||||
assert isinstance(key, str), f"ctx.{self.lookup_type}_names used with an id, use the lookup_in_ helpers instead"
|
||||
return self._game_store[key]
|
||||
|
||||
def __len__(self) -> int:
|
||||
|
Reference in New Issue
Block a user