We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
#!/usr/bin/env python3 import click @click.command() @click.option('--multioption', multiple=True, default=None, help='My help', show_default=True) def info(_multioption): pass if __name__ == '__main__': info()
Notice multiple=True which is crucial. If you replace it with multiple=False it will work just fine.
multiple=True
multiple=False
$ ./test.py --help Usage: test.py [OPTIONS] Options: --multioption TEXT My help [default: ] --help Show this message and exit. [default: False]
$ ./test.py --help Usage: test.py [OPTIONS] Options: --multioption TEXT My help --help Show this message and exit. [default: False]
$ python3 --version Python 3.9.2
$ python -c "import click; print(click.__version__)" 8.0.1
(I checked that 8.0.2.dev0 is also affected)
8.0.2.dev0
The text was updated successfully, but these errors were encountered:
Do not print empty default value for multi-option
262d1c9
Fixes pallets#1969
f3f7706
Successfully merging a pull request may close this issue.
Minimal reproducible example that demonstrates the bug
Notice
multiple=True
which is crucial. If you replace it withmultiple=False
it will work just fine.What I get
Expected output
Environment
Python version
Click version
(I checked that
8.0.2.dev0
is also affected)The text was updated successfully, but these errors were encountered: