Skip to content

Commit

Permalink
Fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
janosg committed Jan 20, 2024
1 parent 0f3d567 commit 624c493
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/tranquilo/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,9 @@ def update_option_bundle(default_options, user_options=None):
# convert types if possible
typed = {}
for k, v in user_options.items():
target_type = type(getattr(default_options, k))
if isinstance(v, target_type):
default_option = getattr(default_options, k)
target_type = type(default_option)
if isinstance(v, target_type) or default_option is None:
typed[k] = v
else:
typed[k] = target_type(v)
Expand Down

0 comments on commit 624c493

Please sign in to comment.