I would like to be able to specify help on positional arguments.
@click.group()
def cli():
click.echo(u'shellfoundry - CloudShell shell command-line tool')
pass
@cli.command()
@click.argument(u'name', help='Shell name to be created')
@click.argument(u'template', default=u'default', help='Template to be used')
def new(name, template):
"""
Create a new shell based on a template.\r\n
"""
NewCommandExecutor().new(name, template)
The above code throws the below exception:
Traceback (most recent call last):
File "C:\Python27\lib\runpy.py", line 162, in run_module_as_main
"main", fname, loader, pkg_name)
File "C:\Python27\lib\runpy.py", line 72, in run_code
exec code in run_globals
File "c:\work\GitHub\shellfoundry\shellfoundry__main.py", line 6, in
from bootstrap import cli
File "shellfoundry\bootstrap.py", line 36, in
@click.argument(u'template', default=u'default', help='Template to be used')
File "C:\Python27\lib\site-packages\click\decorators.py", line 151, in decorator
_param_memo(f, ArgumentClass(param_decls, **attrs))
File "C:\Python27\lib\site-packages\click\core.py", line 1693, in init
Parameter.init(self, param_decls, required=required, **attrs)
TypeError: init() got an unexpected keyword argument 'help'
I would like to be able to specify help on positional arguments.
The above code throws the below exception: