The @command decorator is annotated as always returning Command.
This is a problem when supplying custom class, e.g.:
@click.command(cls=MyClass)
def foo():
...
reveal_type(foo) # revealed type is `Command`
foo.my_property = 6 # error: `Command` does not have a member `my_property`
Environment:
- Python version: any
- Click version: 8.x
The
@commanddecorator is annotated as always returningCommand.This is a problem when supplying custom class, e.g.:
Environment: