-
-
Notifications
You must be signed in to change notification settings - Fork 683
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
🐛 Fix shell_complete
not working for Arguments
#737
Conversation
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.
I think we need get_param_completion
to be able to skip some of the parameters for the shell_complete
function, such as shell_complete(incomplete: str)
.
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.
Nice catch! The one line fix seems correct to me, and I can confirm that it fixes the bug that was reported earlier in #334.
Thanks for adding a test! I just moved it out of compat
and into test_others.py
where there were a few other completion
tests as well. Not sure if this is where Tiangolo wants it or someplace else 😇
shell_complete
not working for Arguments
As pointed out in #334 the shell_complete parameter on Arguments is not called. This is a very simple bug where shell_complete was simply omitted as a parameter passed to TyperArgument.
This PR adds the missing parameter resulting in a one line change in the library and it adds one additional completion test that tests that shell_complete works as expected when given to an Argument.