Skip to content

Commit

Permalink
feat: skip validation of choices (not provided)
Browse files Browse the repository at this point in the history
  • Loading branch information
Romazes committed Sep 20, 2024
1 parent 68caade commit 2103f1b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lean/models/click_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ def get_click_option_type(configuration: Configuration):
if configuration._input_method == "confirm":
return bool
elif configuration._input_method == "choice":
# Skip validation if no predefined choices in config and user provided input manually
if not configuration._choices:
return str
return Choice(configuration._choices, case_sensitive=False)
elif configuration._input_method == "prompt":
return configuration.get_input_type()
Expand Down

0 comments on commit 2103f1b

Please sign in to comment.