Use "in" clause on dict instead of new method

This commit is contained in:
Darren Thompson 2025-08-02 16:10:34 -04:00
parent 0825671ccb
commit f4f1817e31
2 changed files with 1 additions and 8 deletions

View File

@ -70,8 +70,7 @@ class PlayerInfo:
idx = 0
# Empty option set is a non-zero opt array, unsure how to do this check with validated_dict cleanly?
if not profile.has_key("opt"):
if "opt" not in profile:
profile.replace_int_array("opt", 16, [2, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 2, 0, 0, 0, 0])
for entry in profile.get_int_array("opt", 16):

View File

@ -444,12 +444,6 @@ class ValidatedDict(dict):
else:
self[name] = self[name] + 1
def has_key(self, name: str) -> bool:
if name in self:
return True
return False
class Profile(ValidatedDict):
"""