Maybe I've misunderstood how parameter specification variables are supposed to used, but this is what I have: ```python from typing import TypeVar, Generic, ParamSpec, Protocol, Callable from functools import partial T = TypeVar("T", covariant=True) P = ParamSpec("P") class JittedFunction(Protocol, Generic[P, T]): def __call__(self, *args: P.args, **kwargs: P.kwargs) -> T: ... def lower(self) -> int: ... def jit(fun: Callable[P, T], *, x: int) -> JittedFunction[P, T]: pass @partial(jit, x=2) # error: Argument 1 to "partial" has incompatible type "Callable[[Callable[P, Any], NamedArg(int, 'x')], JittedFunction[P]]"; expected "Callable[..., JittedFunction[P]]" [arg-type] def f(y: int) -> int: return y ```
Activity
erictraut commentedon Feb 12, 2022
Your code looks correct to me. This type checks without errors in pyright.
NeilGirdhar commentedon Feb 12, 2022
Thanks @erictraut ! You're always very helpful.
ilevkivskyi commentedon Aug 16, 2023
Original example works on master, likely fixed by #15837