Skip to content

Commit

Permalink
Update mex/common/cli.py
Browse files Browse the repository at this point in the history
Co-authored-by: Nicolas Drebenstedt <[email protected]>
Signed-off-by: rababerladuseladim <[email protected]>
  • Loading branch information
rababerladuseladim and cutoffthetop authored Nov 15, 2023
1 parent 4cb3418 commit 2f93f4b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mex/common/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,10 @@ def _field_to_option(name: str, settings_cls: type[SettingsType]) -> Option:
# https://pydantic-docs.helpmanual.io/usage/types/#secret-types
field = settings_cls.model_fields[name]

field_type: Any = str
if field.annotation in (int, bool, float):
field_type = field.annotation
else:
field_type: Any = str

if field.is_required():
default = None
Expand Down

0 comments on commit 2f93f4b

Please sign in to comment.