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
Setting is_flag=False, flag_value=value tells Click that the option can still be passed a value, but if only the flag is given, the value will be flag_value.
Since 8.3.0 this doesn't work anymore, instead SystemExit with "Error: Option '--xyz' requires an argument." is thrown.
Activity
Rowlando13 commentedon Sep 24, 2025
Thanks for the clear report! We will work on this
pawamoy commentedon Oct 2, 2025
MkDocs seems to be affected by this again, like with version 8.2.2. Here's how it declares its boolean flags: https://github.com/mkdocs/mkdocs/blob/f68e5fc18d3cd3811dbddfdeda1a57721f9e2e4e/mkdocs/__main__.py#L253-L264. Should MkDocs change something or is Click 8.3.0 suffering from the same kind of issue as 8.2.2?
Rowlando13 commentedon Oct 2, 2025
This is still broken in 8.3.0.
Fix pallets#3084: Optional value not working with flag_value
Fix pallets#3084: Correct flag optional value behavior and add compre…
Fix pallets#3084: Restore documented flag_value behavior, update docs…
Fix pallets#3084: Correct flag optional value behavior and add compre…
chore: Downgrade click to mitigate a temporary issue for mkdocs serve…
docs: workaround upstream mkdocs live reloading bug
Upgrade Inspect AI to 0.3.146.dev9+gdeec1b7a (#568)
uriii3 commentedon Nov 19, 2025
Fix pallets#3084: Correct flag optional value behavior and add compre…
is_flag=Falseis broken #3336 as a duplicate of this issue