click 6.0 doesn't work on Python 3.5 on Linux TypeError: __init__() got an unexpected keyword argument 'help'

Created on 25 Nov 2015  路  1Comment  路  Source: pallets/click

# 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

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.

>All comments

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.

Was this page helpful?
0 / 5 - 0 ratings