@@ -2473,7 +2473,8 @@ def func(caller: Caller) -> None:
24732473 pass
24742474
24752475func(call)
2476- func(bad) # E: Argument 1 to "func" has incompatible type "Callable[[int, VarArg(str)], None]"; expected "Caller"
2476+ func(bad) # E: Argument 1 to "func" has incompatible type "Callable[[int, VarArg(str)], None]"; expected "Caller" \
2477+ # N: "Caller.__call__" has type "Callable[[Arg(str, 'x'), VarArg(int)], None]"
24772478[builtins fixtures/tuple.pyi]
24782479[out]
24792480
@@ -2510,7 +2511,8 @@ def func(caller: Caller) -> None:
25102511 pass
25112512
25122513func(call)
2513- func(bad) # E: Argument 1 to "func" has incompatible type "Callable[[int], int]"; expected "Caller"
2514+ func(bad) # E: Argument 1 to "func" has incompatible type "Callable[[int], int]"; expected "Caller" \
2515+ # N: "Caller.__call__" has type "Callable[[Arg(T, 'x')], T]"
25142516[builtins fixtures/tuple.pyi]
25152517[out]
25162518
@@ -2530,7 +2532,8 @@ def func(caller: Caller) -> None:
25302532 pass
25312533
25322534func(call)
2533- func(bad) # E: Argument 1 to "func" has incompatible type "Callable[[T], Tuple[T, T]]"; expected "Caller"
2535+ func(bad) # E: Argument 1 to "func" has incompatible type "Callable[[T], Tuple[T, T]]"; expected "Caller" \
2536+ # N: "Caller.__call__" has type "Callable[[Arg(int, 'x')], int]"
25342537[builtins fixtures/tuple.pyi]
25352538[out]
25362539
@@ -2557,7 +2560,8 @@ def func(caller: Caller) -> None:
25572560 pass
25582561
25592562func(call)
2560- func(bad) # E: Argument 1 to "func" has incompatible type "Callable[[Union[int, str]], Union[int, str]]"; expected "Caller"
2563+ func(bad) # E: Argument 1 to "func" has incompatible type "Callable[[Union[int, str]], Union[int, str]]"; expected "Caller" \
2564+ # N: "Caller.__call__" has type overloaded function
25612565[out]
25622566
25632567[case testCallableImplementsProtocolExtraNote]
@@ -2596,7 +2600,8 @@ def anon(caller: CallerAnon) -> None:
25962600
25972601
25982602func(call)
2599- func(bad) # E: Argument 1 to "func" has incompatible type "Callable[[str], None]"; expected "Caller"
2603+ func(bad) # E: Argument 1 to "func" has incompatible type "Callable[[str], None]"; expected "Caller" \
2604+ # N: "Caller.__call__" has type "Callable[[Arg(str, 'x')], None]"
26002605anon(bad)
26012606[out]
26022607
@@ -2619,7 +2624,8 @@ a: Other
26192624b: Bad
26202625
26212626func(a)
2622- func(b) # E: Argument 1 to "func" has incompatible type "Bad"; expected "One"
2627+ func(b) # E: Argument 1 to "func" has incompatible type "Bad"; expected "One" \
2628+ # N: "One.__call__" has type "Callable[[Arg(str, 'x')], None]"
26232629[out]
26242630
26252631[case testJoinProtocolCallback]
@@ -3589,7 +3595,8 @@ test(C) # E: Argument 1 to "test" has incompatible type "Type[C]"; expected "P"
35893595 # N: Expected: \
35903596 # N: def __call__(x: int, y: int) -> Any \
35913597 # N: Got: \
3592- # N: def __init__(x: int, y: str) -> C
3598+ # N: def __init__(x: int, y: str) -> C \
3599+ # N: "P.__call__" has type "Callable[[Arg(int, 'x'), Arg(int, 'y')], Any]"
35933600
35943601[case testProtocolClassObjectPureCallback]
35953602from typing import Any, ClassVar, Protocol
@@ -3610,7 +3617,8 @@ test(C) # E: Argument 1 to "test" has incompatible type "Type[C]"; expected "P"
36103617 # N: Expected: \
36113618 # N: def __call__(x: int, y: int) -> Any \
36123619 # N: Got: \
3613- # N: def __init__(x: int, y: str) -> C
3620+ # N: def __init__(x: int, y: str) -> C \
3621+ # N: "P.__call__" has type "Callable[[Arg(int, 'x'), Arg(int, 'y')], Any]"
36143622[builtins fixtures/type.pyi]
36153623
36163624[case testProtocolClassObjectCallableError]
0 commit comments