-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix default values of multiple options with optional values #2004
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 default values of multiple options with optional values #2004
Conversation
c9e79f3 to
29c74c8
Compare
|
Things get a bit weird with Also, default values populated from |
That needs to be addressed, the value may only come from one source. |
Prompting issue is no longer relevant as I've reverted prompting-related changes I made
@davidism OK, I'll need some more input from you then, there are two potential cases that I'm seeing: Without a promptSo if you do Lines 2867 to 2869 in ce152bd
So everything seems fine in this case as is, assuming that With a prompt
Seeing how it doesn't seem possible to set an iterable value via the prompt, there's no problem with |
29c74c8 to
30b704c
Compare
|
@davidism OK, I've reverted the changes related to prompting, as it's not really related to the issue at hand. So things should be pretty straightforward now and source is set to |
Co-authored-by: David Lord <davidism@gmail.com>
e0c8441 to
aa6f360
Compare
Fixes default values for multiple options with optional values. The sentinel object (
click.core._flag_needs_value) is now properly replaced by the value offlag_value.Checklist:
CHANGES.rstsummarizing the change and linking to the issue... versionchanged::entries in any relevant code docs.pre-commithooks and fix any issues.pytestandtox, no tests failed.