-
-
Notifications
You must be signed in to change notification settings - Fork 839
Handle Abort/Exit during shell completion #1487
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
base: master
Are you sure you want to change the base?
Conversation
svlandeg
left a comment
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.
Thanks for the PR! Can you look into the coverage tests that are failing?
svlandeg
left a comment
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.
Makes sense to me!
| assert out.err == "" | ||
|
|
||
|
|
||
| def test_fake_completion_default_methods_are_covered(): |
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.
This is just to avoid coverage issues on this particular file, right? As it's a test file, it's cleaner to just add # pragma: no cover to those respective lines, no need to have a test testing the test 😉
Fixes #286
When running shell completion, autocompletion callbacks may raise click.exceptions.Abort or
click.exceptions.Exit. This should not print a traceback; completion should abort silently and
return no completions instead.