basedpyright icon indicating copy to clipboard operation
basedpyright copied to clipboard

a way to specify kwargs in `Callable`s and `ParamSpec`s

Open DetachHead opened this issue 1 year ago • 1 comments

currently mypy supports it in mypy_extensions, so pyright needs an equivalent

from typing import *
from mypy_extensions import Arg

P = ParamSpec("P")

class A(Generic[P]): ...
a: A[[Arg(int, 'a')]]
c: Callable[[Arg(int, 'a')], None]

DetachHead avatar Jan 16 '24 00:01 DetachHead

Can we just support mypy_extensions?

KotlinIsland avatar Mar 25 '24 06:03 KotlinIsland