Replies: 1 comment
-
If you are using It is potentially a missing feature/enhancement that would be useful, but I'm not sure if it could be done in a generic way. @kmvanbrunt @anselor Do either of you have any thoughts on this? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Thank you for the wonderful software project! Using 'cmd2' for an interactive command-line application has been wonderful. I noticed that when using the 'choices_provider' argument with Cmd2ArgumentParser it does not validate the input given by the user, however, when using 'choices' it does validate (check input) the given value. I'm using version 2.2.0 and it appears the behavior is the same for master/tip, so I assume this is by design as only action.choices is considered in _ArgumentParser_check_value(). Using 'choices' is not an option for me since the choices permitted are dynamic (returned by a function, not a static list).
Should I just plan on checking values in my own code when using 'choices_provider' or is this a missing feature/enhancement that would be worthy to contribute?
Thanks,
Marc
Beta Was this translation helpful? Give feedback.
All reactions