# click_test.py
import click
@click.command()
@click.argument('--config', '-c', default='config.cfg', help='Config file')
@click.argument('--out_dir', '-d', default='/tmp', help='Out dir')
def main(config, out_dir):
"""Click test"""
pass
main()
$ python click_test.py
Traceback (most recent call last):
File "click_test.py", line 5, in <module>
@click.argument('--out_dir', '-d', default='/tmp', help='Out dir')
File "/home/dev/click/lib/python3.5/site-packages/click/decorators.py", line 151, in decorator
_param_memo(f, ArgumentClass(param_decls, **attrs))
File "/home/dev/click/lib/python3.5/site-packages/click/core.py", line 1669, in __init__
Parameter.__init__(self, param_decls, required=required, **attrs)
TypeError: __init__() got an unexpected keyword argument 'help'
$ pip list
click (6.0)
pip (7.1.2)
setuptools (18.2)
wheel (0.24.0)
$ python -V
Python 3.5.0
$ uname -a
Linux dev 4.1.12-boot2docker #1 SMP Tue Nov 3 06:03:36 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
$ env|grep en_US
LC_ALL=en_US.utf-8
LANG=en_US.utf-8
Arguments do not accept help text so they do not have a parameter named help. This is documented. I suppose you wanted to create options instead.
Most helpful comment
Arguments do not accept help text so they do not have a parameter named
help. This is documented. I suppose you wanted to create options instead.