-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Description
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
import click
@click.command()
@click.version_option()
def main() -> None:
"""Main."""
if __name__ == "__main__":
main()repro.sh
#!/bin/bash
virtualenv -p 3.9 venv
. venv/bin/activate
pip install mypy types-click
mypy --strict --pretty repro.pyActual output:
repro.py:5: error: Untyped decorator makes function "main" untyped
@click.version_option()
^
Found 1 error in 1 file (checked 1 source file)
Expected output:
Success: no issues found in 1 source file
Environment:
$ venv/bin/pip freeze
mypy==0.902
mypy-extensions==0.4.3
toml==0.10.2
types-click==7.1.1
typing-extensions==3.10.0.0ska-kialo
Metadata
Metadata
Assignees
Labels
No labels