-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Use of click.version_option results in "untyped decorator" error #5642
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
Comments
Having the same issue with |
Please note that starting with click 8, click ships a |
@srittau Thanks for clarifying this. I guess the pitfall here is:
Assuming that click is installed, removing types-click also solves this. |
click >= 8.0 ships with py.typed, so types-click is not required. Installing types-click with click >= 8.0 leads to a mypy error: - python/typeshed#5642
click >= 8.0 ships with py.typed, so types-click is not required. Installing types-click with click >= 8.0 leads to a mypy error: - python/typeshed#5642
Weird that uninstalling types-click changes anything. Anyway, I have opened python/mypy#10652 to remove the suggestion to install these stubs. |
* Remove types-click from Nox session for mypy click >= 8.0 ships with py.typed, so types-click is not required. Installing types-click with click >= 8.0 leads to a mypy error: - python/typeshed#5642 * Remove unused `type: ignore` on `@click.version_option`
* Remove types-click from Nox session for mypy click >= 8.0 ships with py.typed, so types-click is not required. Installing types-click with click >= 8.0 leads to a mypy error: - python/typeshed#5642 * Remove unused `type: ignore` on `@click.version_option` Original-Commit: cjolowicz/cookiecutter-hypermodern-python@a901928
The pallets libraries are now bundled with a `py.typed` file. Suggesting to install these stubs only leads to confusion. See python/typeshed#5423 and python/typeshed#5642 for context.
The pallets libraries are now bundled with a `py.typed` file. Suggesting to install these stubs only leads to confusion. See python/typeshed#5423 and python/typeshed#5642 for context.
* Remove types-click from Nox session for mypy click >= 8.0 ships with py.typed, so types-click is not required. Installing types-click with click >= 8.0 leads to a mypy error: - python/typeshed#5642 * Remove unused `type: ignore` on `@click.version_option`
* Remove types-click from Nox session for mypy click >= 8.0 ships with py.typed, so types-click is not required. Installing types-click with click >= 8.0 leads to a mypy error: - python/typeshed#5642 * Remove unused `type: ignore` on `@click.version_option`
Using mypy 0.902 and types-click 7.1.1,
@click.version_option
is considered untyped, resulting in this error:Untyped decorator makes function "main" untyped
Steps to reproduce:
repro.py
repro.sh
Actual output:
Expected output:
Environment:
The text was updated successfully, but these errors were encountered: