forked from mirror/Archipelago
Options: Assert Not All Option in Options.as_dict (#5039)
* Options: forbid worlds just dumping every single option they don't need * make the equal proper --------- Co-authored-by: Exempt-Medic <[email protected]>
This commit is contained in:
co-authored by
Exempt-Medic
parent
608a38f873
commit
1923d6b1bc
@@ -1315,6 +1315,7 @@ class CommonOptions(metaclass=OptionsMetaProperty):
|
||||
will be returned as a sorted list.
|
||||
"""
|
||||
assert option_names, "options.as_dict() was used without any option names."
|
||||
assert len(option_names) < len(self.__class__.type_hints), "Specify only options you need."
|
||||
option_results = {}
|
||||
for option_name in option_names:
|
||||
if option_name not in type(self).type_hints:
|
||||
|
||||
Reference in New Issue
Block a user