From 67520adceae7d7a1222afd319ab274868f3bd3b9 Mon Sep 17 00:00:00 2001 From: Exempt-Medic <60412657+Exempt-Medic@users.noreply.github.com> Date: Sun, 11 Aug 2024 20:13:45 -0400 Subject: [PATCH] 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 --------- Co-authored-by: Aaron Wagener Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> --- Options.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Options.py b/Options.py index d0408285..e22ee1ee 100644 --- a/Options.py +++ b/Options.py @@ -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: