-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Click evaluates default callbacks during tab-completion #2614
Comments
danielhollas
changed the title
Click evaluates defaults during tab-completion
Click evaluates default callbacks during tab-completion
Oct 18, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In our app we pass certain defaults via callbacks because they are expensive to calculate. Specifically we want a snappy tab completion. However, it seems that since Click 8.0 the defaults are evaluated even during the tab-autocompletion. I am not sure if this is an expected behaviour or a bug?
It seems that before v8 the behaviour was different. You can see that in the API docs, in an (apparently outdated) comment about
resilient_parsing
context parameter. https://click.palletsprojects.com/en/8.1.x/api/#click.ContextBut looking through the
core.py
code, this flag does not seem honored in the relevant code paths AFAIK. Before that there was even an explicit flagignore_default_values
, which was removed here. 02202b6#diff-89531a2fdd908d78f3d3e9bb04de62cb9ad7fd27454da83249937ac29c6f683aR1438If this is an expected behaviour, I would appreciate advice as to how to override it. Thanks!
Environment:
The text was updated successfully, but these errors were encountered: