More bug fixes

This commit is contained in:
Fabian Dill
2022-04-01 03:42:56 +02:00
committed by Fabian Dill
parent 65864e273b
commit ae163319e0
2 changed files with 23 additions and 6 deletions

View File

@@ -38,6 +38,7 @@ class AssembleOptions(type):
return ret
return validate
attrs["__init__"] = validate_decorator(attrs["__init__"])
else:
# construct an __init__ that calls parent __init__
@@ -53,6 +54,7 @@ class AssembleOptions(type):
return super(AssembleOptions, mcs).__new__(mcs, name, bases, attrs)
T = typing.TypeVar('T')
@@ -199,7 +201,7 @@ class Choice(Option[int]):
if isinstance(other, self.__class__):
return other.value != self.value
elif isinstance(other, str):
assert other in self.options , f"compared against a str that could never be equal. {self} != {other}"
assert other in self.options, f"compared against a str that could never be equal. {self} != {other}"
return other != self.current_key
elif isinstance(other, int):
assert other in self.name_lookup, f"compared against am int that could never be equal. {self} != {other}"
@@ -507,7 +509,6 @@ per_game_common_options = {
"item_links": ItemLinks
}
if __name__ == "__main__":
from worlds.alttp.Options import Logic