-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI: fix choices of InteractiveOption
not being displayed
#5432
CLI: fix choices of InteractiveOption
not being displayed
#5432
Conversation
c73fc5c
to
6e2740e
Compare
Doing a bit of field testing... Seems that the help message doesn't show properly for Installed on target computer? [Y/n]: ?
Error: invalid input And some options show Computer: ?
Name of the computer, on which the code is installed.
Select one of:
localhost None Default calculation input plugin: ?
Entry point name of the default calculation plugin (as listed in 'verdi plugin list aiida.calculations').
Select one of:
aiida.calculations:arithmetic.add None
aiida.calculations:core.arithmetic.add None
[...] I'm assuming because |
The choices of interactive options were not being displayed in interactive mode when the special character `?` was passed. This bug was introduced when `click_completion` was dropped for the tab-completion feature that ships with `click` itself as of `v8.0`. The complete method changed from `complete` to `shell_complete` and the `get_help_message` of the `InteractiveOption` was not properly updated.
6e2740e
to
9c5835c
Compare
yeah the help always being shown is my bad, pushed a fix. The first problem you highlight is due to something else and not related to this fix. I suspect that the validation of type (which is a boolean) is called before it hits our override. Will look into fixing it |
The problem with the help not being displayed for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, I won't push the scope creep since we want this in the release, but maybe we should open an issue for the boolean option prompts?
Yeah I am working on it now and if I cannot fix it soon, will open an issue and describe what I found so far. |
Fixes #5406
The choices of interactive options were not being displayed in
interactive mode when the special character
?
was passed. This bug wasintroduced when
click_completion
was dropped for the tab-completionfeature that ships with
click
itself as ofv8.0
. The complete methodchanged from
complete
toshell_complete
and theget_help_message
of the
InteractiveOption
was not properly updated.