Open
Description
Bug Report
seems dmypy is unable to suggest an annotation when a function is decorated even with a trivial decorator (likely as the implementation predates widespread ParamSpec usage)
I believe the fix is deleting this line?
Line 656 in 454989f
To Reproduce
from typing import Callable
def dec[R, **P](f: Callable[P, R]) -> Callable[P, R]:
return f
@dec
def f():
print('hello world')
[mypy]
check_untyped_defs = true
Expected Behavior
$ dmypy check .
...
$ dmypy suggest t.f
() -> None
Actual Behavior
$ dmypy check .
...
$ dmypy suggest t.f
Object t.f is a decorator we can't handle
Your Environment
- Mypy version used: 1.15.0
- Mypy command-line flags: (see above)
- Mypy configuration options from
mypy.ini
(and other config files): (see above) - Python version used: 3.13.1