Skip to content

Commit 5510551

Browse files
authored
clean up handing ellipsis
1 parent 7c6a563 commit 5510551

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

settings.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,12 @@ def create_options_dict(options: Sequence[BaseOption]) -> dict[str, JSON]:
8181
Returns:
8282
The options' values in dict form.
8383
"""
84-
settings: dict[str, JSON] = {
85-
option.identifier: cast(JSON, option._to_json()) # type: ignore
84+
return {
85+
option.identifier: child_json
8686
for option in options
87-
if option._to_json() != ... # type: ignore
87+
if (child_json := option._to_json()) is not ... # pyright: ignore[reportPrivateUsage]
8888
}
8989

90-
return settings
91-
9290

9391
def default_save_mod_settings(self: Mod) -> None:
9492
"""Default implementation for Mod.save_settings."""

0 commit comments

Comments
 (0)