void () { doTest("int", "(x: int, y: str) -> int", """ from typing import Concatenate, Callable, ParamSpec, TypeVar P = ParamSpec("P") R = TypeVar("R") class Request: def foo(self): pass def with_request(f: Callable[Concatenate[Request, P], R]) -> Callable[P, R]: def inner(*args: P.args, **kwargs: P.kwargs) -> R: return f(Request(), *args, **kwargs) return inner @with_request def takes_int_str(request: Request, x: int, y: str) -> int: request.foo() return x + len(y) value = takes_int_str(1, "A") dec_func = takes_int_str """); }