mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 04:01:32 -06:00
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 <60412657+Exempt-Medic@users.noreply.github.com>
This commit is contained in:
@@ -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