CC: Add Assert to Catch Old Datapackage Lookup API (#5131)

This commit is contained in:
qwint
2025-07-15 13:30:13 -05:00
committed by GitHub
parent c8ca3e643d
commit c879307b8e

View File

@@ -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: