Discussion: #10700
The type (...) -> Any is the gradual form of a callable. It's the equivalent of Any, and it should be assignable to any callable (and vice versa), so wrapped should be assignable to the return type.
Playground
from typing import Any, Callable, TypeVar
Fn = TypeVar("Fn", bound=Callable)
any_fn: Callable = lambda: None
def decorator(fn: Fn) -> Fn:
return any_fn
# ^^^^^^
# Type "(...) -> Unknown" is not assignable to return type "Fn@decorator"
# Type "(...) -> Unknown" is not assignable to type "Fn@decorator" (reportReturnType)