You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def g(a: Callable[..., None] = lambda *a, **k: 1): # E: Incompatible default for argument "a" (default has type "Callable[[VarArg(Any), KwArg(Any)], int]", argument has type "Callable[..., None]")
1437
+
def g(a: Callable[..., None] = lambda *a, **k: 1): # E: Incompatible default for argument "a" (default has type "def (*a: Any, **k: Any) -> int", argument has type "Callable[..., None]")
Copy file name to clipboardExpand all lines: test-data/unit/check-python311.test
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -157,7 +157,7 @@ Alias1 = Callable[[*Ts], int] # E: Variable "__main__.Ts" is not valid as a typ
157
157
x1: Alias1[int] # E: Bad number of arguments for type alias, expected 0, given 1
158
158
reveal_type(x1) # N: Revealed type is "def (*Any) -> builtins.int"
159
159
x1 = good
160
-
x1 = bad # E: Incompatible types in assignment (expression has type "Callable[[VarArg(int), NamedArg(int, 'y')], int]", variable has type "Callable[[VarArg(Any)], int]")
160
+
x1 = bad # E: Incompatible types in assignment (expression has type "def bad(*x: int, y: int) -> int", variable has type "def (*Any) -> int")
161
161
162
162
Alias2 = Callable[[*T], int] # E: "T" cannot be unpacked (must be tuple or TypeVarTuple)
0 commit comments