Problem
Mypy complains about methods decorated with with_annotated when using strict settings.
How to reproduce
class App(Cmd):
@with_annotated
def do_something(...) -> None: # <- Mypy complains here
...
Expected behavior
Mypy does not complain.
Actual behavior
Mypy reports:
...: error: Type of decorated function contains type "Any" ("Callable[..., Any]") [misc]
def do_something(...)
I think this can be fixed by using ParamSpec instead of the ellipsis notation (Callable[..., Any]). I have not verified it yet.
Problem
Mypy complains about methods decorated with
with_annotatedwhen using strict settings.How to reproduce
Expected behavior
Mypy does not complain.
Actual behavior
Mypy reports:
I think this can be fixed by using
ParamSpecinstead of the ellipsis notation (Callable[..., Any]). I have not verified it yet.