Minimal reproducible example that demonstrates the bug
#!/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.
What I get
$ ./test.py --help
Usage: test.py [OPTIONS]
Options:
--multioption TEXT My help [default: ]
--help Show this message and exit. [default: False]
Expected output
$ ./test.py --help
Usage: test.py [OPTIONS]
Options:
--multioption TEXT My help
--help Show this message and exit. [default: False]
Environment
Python version
$ python3 --version
Python 3.9.2
Click version
$ python -c "import click; print(click.__version__)"
8.0.1
(I checked that 8.0.2.dev0 is also affected)
Minimal reproducible example that demonstrates the bug
Notice
multiple=Truewhich is crucial. If you replace it withmultiple=Falseit will work just fine.What I get
Expected output
Environment
Python version
Click version
(I checked that
8.0.2.dev0is also affected)