File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -3628,7 +3628,8 @@ from typing import Generic, Callable
36283628from typing_extensions import ParamSpec
36293629
36303630P = ParamSpec("P")
3631- class X1(Generic[P]): ...
3631+ class X1(Generic[P]):
3632+ def __call__(self, *a: P.args, **k: P.kwargs) -> None: ...
36323633X2 = Callable[P, None]
36333634
36343635x1: X1[()]
@@ -3637,8 +3638,10 @@ x2: X2[()]
36373638reveal_type(x1) # N: Revealed type is "__main__.X1[[]]"
36383639reveal_type(x2) # N: Revealed type is "def ()"
36393640
3641+ x1()
3642+ x1(5) # E: Too many arguments for "__call__" of "X1"
36403643x2()
3641- x2(int ) # E: Too many arguments
3644+ x2(5 ) # E: Too many arguments
36423645[builtins fixtures/tuple.pyi]
36433646
36443647[case testMissingTypeArgsInApplication]
You can’t perform that action at this time.
0 commit comments