Core: Add __iter__ to VerifyKeys (#3550)

* Add __iter__ to VerifyKeys

* Typing
This commit is contained in:
NewSoupVi 2024-11-29 01:42:08 +01:00 committed by GitHub
parent 82260d728f
commit 710cf4ebba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -828,7 +828,10 @@ class VerifyKeys(metaclass=FreezeValidKeys):
f"is not a valid location name from {world.game}. " f"is not a valid location name from {world.game}. "
f"Did you mean '{picks[0][0]}' ({picks[0][1]}% sure)") f"Did you mean '{picks[0][0]}' ({picks[0][1]}% sure)")
def __iter__(self) -> typing.Iterator[typing.Any]:
return self.value.__iter__()
class OptionDict(Option[typing.Dict[str, typing.Any]], VerifyKeys, typing.Mapping[str, typing.Any]): class OptionDict(Option[typing.Dict[str, typing.Any]], VerifyKeys, typing.Mapping[str, typing.Any]):
default = {} default = {}
supports_weighting = False supports_weighting = False