From c879307b8e1cffa75afb3b1b14ae7f6e3b593f5c Mon Sep 17 00:00:00 2001 From: qwint Date: Tue, 15 Jul 2025 13:30:13 -0500 Subject: [PATCH] CC: Add Assert to Catch Old Datapackage Lookup API (#5131) --- CommonClient.py | 1 + 1 file changed, 1 insertion(+) diff --git a/CommonClient.py b/CommonClient.py index 3a5f51ae..35ed541f 100644 --- a/CommonClient.py +++ b/CommonClient.py @@ -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: