Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

raise a more descriptive exception when @command decorator isn't called #1359

Closed
zevaverbach opened this issue Jul 26, 2019 · 0 comments · Fixed by #1896
Closed

raise a more descriptive exception when @command decorator isn't called #1359

zevaverbach opened this issue Jul 26, 2019 · 0 comments · Fixed by #1896
Milestone

Comments

@zevaverbach
Copy link

Click 7.0, Python 3.7.4

Having done pip install -e . on my package to set up the CLI command, this error is raised because I decorated the main CLI function with click.command instead of click.command():

Traceback (most recent call last):
  File "/Users/zev/.local/share/virtualenvs/myvirtualenvname-CI6hzx9c/bin/capture", line 11, in <module>
    load_entry_point('myvirtualenvname', 'console_scripts', 'my_module_name')()
TypeError: decorator() missing 1 required positional argument: 'f'

Would it be possible to raise a more informative exception referring to the decorator not having been called?

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants