-
-
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
Option.is_bool_flag is set to True even if the option is not a flag #1925
Comments
Not sure if this is related but an option defined like this: @click.option("--code", nargs=1, default=False, help="Foo") Had a type TEXT in click 7
and now has a type BOOLEAN in click 8.
I'm trying to fix it in pipenv because I think the type should be explicitly defined: pypa/pipenv#4726 |
@frenzymadness Your thing is not related to this issue specifically, but it's related to the same PR. The I'd say the new behavior makes much more sense. What's the point of setting a string options to (*) this should be the preferred solution, especially if you need to handle the "not provided" case separately and you are using static typing. |
This is relevant only for Click 8.0.1, since the following line was introduced in PR #1913:
click/src/click/core.py
Line 2531 in af0af57
The solution is as easy as:
Available to open a PR.
Demonstration code
The text was updated successfully, but these errors were encountered: