Skip to content

Commit

Permalink
chore: change args and options combining for clearity
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-mil committed Aug 11, 2024
1 parent d84dd63 commit 5ec06cf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bing_rewards/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

@dataclasses.dataclass()
class Config:
"""Default settings file config and types."""
"""Default settings for file config and types."""

desktop_count: int = DESKTOP_COUNT
mobile_count: int = MOBILE_COUNT
Expand Down Expand Up @@ -205,5 +205,7 @@ def get_options() -> Namespace:
"""Combine the defaults, config file options, and command line arguments into one Namespace."""
file_config = read_config()
args = parse_args()
args.__dict__ = vars(file_config) | {k: v for k, v in vars(args).items() if v is not None}
args.__dict__ = dataclasses.asdict(file_config) | {
k: v for k, v in vars(args).items() if v is not None
}
return args

0 comments on commit 5ec06cf

Please sign in to comment.