Open jeffb4 opened 4 years ago
argparse has the concept of setting a choices container for an argument. This is useful for automatically limiting user input and printing allowed choices in generated help, see https://docs.python.org/3/library/argparse.html#choices
argparse
choices
I don't know if https://github.com/sdispater/clikit/blob/master/src/clikit/api/args/format/option.py would be the correct place to add such an configuration knob, or what that would look like in the class proper and in the help generation code
argparse
has the concept of setting achoices
container for an argument. This is useful for automatically limiting user input and printing allowed choices in generated help, see https://docs.python.org/3/library/argparse.html#choicesI don't know if https://github.com/sdispater/clikit/blob/master/src/clikit/api/args/format/option.py would be the correct place to add such an configuration knob, or what that would look like in the class proper and in the help generation code