Skip to content
New issue

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

@click.argument don't support help parameter #1049

Closed
Ralph-Wang opened this issue Jun 20, 2018 · 2 comments
Closed

@click.argument don't support help parameter #1049

Ralph-Wang opened this issue Jun 20, 2018 · 2 comments

Comments

@Ralph-Wang
Copy link

@click.command()
@click.argument("arg", help="help message")
def hello(arg):
    pass

hello()

The error message

Traceback (most recent call last):
  File "x.py", line 7, in <module>
    @click.argument("arg", help="help message")
  File "/Users/ralph-wang/.pyenv/py3/lib/python3.6/site-packages/click/decorators.py", line 151, in decorator
    _param_memo(f, ArgumentClass(param_decls, **attrs))
  File "/Users/ralph-wang/.pyenv/py3/lib/python3.6/site-packages/click/core.py", line 1699, in __init__
    Parameter.__init__(self, param_decls, required=required, **attrs)
TypeError: __init__() got an unexpected keyword argument 'help'

It seems that we don't support help message in argument. Is that designed for?

@Ralph-Wang
Copy link
Author

I post a PR to support help message for argument, as I thinks it's an important feature that we have ability to print some detail message for arguments

@jcrotts
Copy link
Contributor

jcrotts commented Jul 12, 2018

Closed, see #1051 for discussion.

@jcrotts jcrotts closed this as completed Jul 12, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants