mirror of
https://github.com/ArchipelagoMW/Archipelago.git
synced 2026-09-25 05:14:34 -07:00
Core: Error on empty options.as_dict (#3773)
* Error on empty options.as_dict * ValueError instead * Apply suggestions from code review Co-authored-by: Aaron Wagener <[email protected]> --------- Co-authored-by: Aaron Wagener <[email protected]> Co-authored-by: NewSoupVi <[email protected]>
This commit is contained in:
co-authored by
Aaron Wagener
NewSoupVi
parent
a3e54a951f
commit
67520adcea
@@ -1236,6 +1236,7 @@ class CommonOptions(metaclass=OptionsMetaProperty):
|
||||
:param option_names: names of the options to return
|
||||
:param casing: case of the keys to return. Supports `snake`, `camel`, `pascal`, `kebab`
|
||||
"""
|
||||
assert option_names, "options.as_dict() was used without any option names."
|
||||
option_results = {}
|
||||
for option_name in option_names:
|
||||
if option_name in type(self).type_hints:
|
||||
|
||||
Reference in New Issue
Block a user