You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add choices parameter to argument and option functions to accept list of allowed values for an argument or an option. Reject any values that do not match the provided list.
Enhancement's value
This would allow developers to specify a limited set of choices and automatically validate the input against that list.
It will be rendered in the documentation generated via --help, help and, thus, automatically explain to user what values are accepted for this option/argument – huge help for users.
Notes
Maybe take the same approach that works in argparse?
The text was updated successfully, but these errors were encountered:
Summary
Add
choices
parameter toargument
andoption
functions to accept list of allowed values for an argument or an option. Reject any values that do not match the provided list.Enhancement's value
--help
,help
and, thus, automatically explain to user what values are accepted for this option/argument – huge help for users.Notes
Maybe take the same approach that works in
argparse
?The text was updated successfully, but these errors were encountered: