Fix TypeVar for decorators that handle Commands by euresti · Pull Request #2155 · pallets/click
davidism
changed the base branch from
main
to
8.0.x
The old type var would throw away the types of Callables.
```
import click
@click.option("--name", prompt="Your name", help="The person to greet.")
def hello(name: str) -> None:
...
reveal_type(hello) # note: Revealed type is 'def (*Any, **Any) -> Any'
```
With this small adjustment mypy now knows that it's a `'def (name: builtins.str)'`
github-actions
bot
locked as resolved and limited conversation to collaborators
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters