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

Make click decorators not modify the type #2322

Merged
merged 1 commit into from
Jul 11, 2018

Conversation

euresti
Copy link
Contributor

@euresti euresti commented Jul 11, 2018

Basically work around python/mypy#3924

@JelleZijlstra JelleZijlstra merged commit 2899d0a into python:master Jul 11, 2018
@gvanrossum
Copy link
Member

I think this introduced a regression. I see code like this:

@click.command()
@click.option("--dump_file", required=True, help="the MySQL dump file to import")
@click.option("--decompress", is_flag=True, default=False, help="decompress dump file")
def cli(dump_file, decompress):
    ...

if __name__ == "__main__":
    cli()

This used to work but now I get

 Too few arguments for "cli"

on that line line.

@euresti
Copy link
Contributor Author

euresti commented Jul 13, 2018

Oh I see. click.command doesn't return f it returns a Command object

@euresti
Copy link
Contributor Author

euresti commented Jul 13, 2018

Fix here: #2331

yedpodtrzitko pushed a commit to yedpodtrzitko/typeshed that referenced this pull request Jan 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants