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
File "/home/amir/projects/click/bug", line 13, in<module>gogo()
File "/home/amir/projects/click/src/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/amir/projects/click/src/click/core.py", line 1050, in main
self._main_shell_completion(extra, prog_name, complete_var)
File "/home/amir/projects/click/src/click/core.py", line 1125, in _main_shell_completion
rv = shell_complete(self, ctx_args, prog_name, complete_var, instruction)
File "/home/amir/projects/click/src/click/shell_completion.py", line 49, in shell_complete
echo(comp.complete())
File "/home/amir/projects/click/src/click/shell_completion.py", line 291, incomplete
completions = self.get_completions(args, incomplete)
File "/home/amir/projects/click/src/click/shell_completion.py", line 272, in get_completions
obj, incomplete = _resolve_incomplete(ctx, args, incomplete)
File "/home/amir/projects/click/src/click/shell_completion.py", line 575, in _resolve_incomplete
if _is_incomplete_argument(ctx, param):
File "/home/amir/projects/click/src/click/shell_completion.py", line 439, in _is_incomplete_argument
value = ctx.params[param.name]
KeyError: 'a'
I think the correct behavior is that nothing should happen or some thing should be printed to stdout. but it shouldn't crash
Environment:
Python version: 3.10
Click version: main
The text was updated successfully, but these errors were encountered:
Changing this line to ctx.params.get(param.name) prints out the helptext for the command instead of the error, maybe preferable to changing expose_value.
setting
expose_value=false
for an argument causes crash when auto-completing.To replicate:
you should get something like the following
I think the correct behavior is that nothing should happen or some thing should be printed to stdout. but it shouldn't crash
Environment:
The text was updated successfully, but these errors were encountered: