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
{{ message }}
Repository navigation
Commit f9e6374
Browse filesBrowse the repository at this point in the historyBrowse files
callables_kwargs.py:102: error: Incompatible types in assignment (expression has type "def func1(**kwargs: **TD2) -> None", variable has type "TDProtocol3") [assignment]
22
-
callables_kwargs.py:102: note: "TDProtocol3.__call__" has type "def __call__(self, *, v1: int, v2: int, v3: str) -> None"
23
-
callables_kwargs.py:103: error: Incompatible types in assignment (expression has type "def func1(**kwargs: **TD2) -> None", variable has type "TDProtocol4") [assignment]
24
-
callables_kwargs.py:103: note: "TDProtocol4.__call__" has type "def __call__(self, *, v1: int) -> None"
25
-
callables_kwargs.py:104: error: Incompatible types in assignment (expression has type "def func1(**kwargs: **TD2) -> None", variable has type "TDProtocol5") [assignment]
26
-
callables_kwargs.py:104: note: "TDProtocol5.__call__" has type "def __call__(self, v1: int, v3: str) -> None"
27
-
callables_kwargs.py:112: error: Overlap between parameter names and ** TypedDict items: "v1" [misc]
28
-
callables_kwargs.py:123: error: Unpack item in ** parameter must be a TypedDict [misc]
29
-
callables_kwargs.py:145: error: Unexpected keyword argument "closed" for "__init_subclass__" of "TypedDict" [call-arg]
30
-
callables_kwargs.py:149: error: Unexpected keyword argument "extra_items" for "__init_subclass__" of "TypedDict" [call-arg]
9
+
callables_kwargs.py:23: error: Unexpected keyword argument "closed" for "__init_subclass__" of "TypedDict" [call-arg]
10
+
callables_kwargs.py:27: error: Unexpected keyword argument "extra_items" for "__init_subclass__" of "TypedDict" [call-arg]
11
+
callables_kwargs.py:55: error: Missing named argument "v1" for "func1" [call-arg]
12
+
callables_kwargs.py:55: error: Missing named argument "v3" for "func1" [call-arg]
13
+
callables_kwargs.py:60: error: Unexpected keyword argument "v4" for "func1" [call-arg]
14
+
callables_kwargs.py:61: error: Too many positional arguments for "func1" [misc]
15
+
callables_kwargs.py:67: error: Argument 1 to "func1" has incompatible type "**dict[str, str]"; expected "int" [arg-type]
16
+
callables_kwargs.py:70: error: Argument 1 to "func1" has incompatible type "**dict[str, object]"; expected "int" [arg-type]
17
+
callables_kwargs.py:70: error: Argument 1 to "func1" has incompatible type "**dict[str, object]"; expected "str" [arg-type]
callables_kwargs.py:121: error: Incompatible types in assignment (expression has type "def func1(**kwargs: **TD2) -> None", variable has type "TDProtocol3") [assignment]
23
+
callables_kwargs.py:121: note: "TDProtocol3.__call__" has type "def __call__(self, *, v1: int, v2: int, v3: str) -> None"
24
+
callables_kwargs.py:122: error: Incompatible types in assignment (expression has type "def func1(**kwargs: **TD2) -> None", variable has type "TDProtocol4") [assignment]
25
+
callables_kwargs.py:122: note: "TDProtocol4.__call__" has type "def __call__(self, *, v1: int) -> None"
26
+
callables_kwargs.py:123: error: Incompatible types in assignment (expression has type "def func1(**kwargs: **TD2) -> None", variable has type "TDProtocol5") [assignment]
27
+
callables_kwargs.py:123: note: "TDProtocol5.__call__" has type "def __call__(self, v1: int, v3: str) -> None"
28
+
callables_kwargs.py:131: error: Overlap between parameter names and ** TypedDict items: "v1" [misc]
29
+
callables_kwargs.py:142: error: Unpack item in ** parameter must be a TypedDict [misc]
30
+
callables_kwargs.py:166: error: Unexpected keyword argument "closed" for "__init_subclass__" of "TypedDict" [call-arg]
31
+
callables_kwargs.py:170: error: Unexpected keyword argument "closed" for "__init_subclass__" of "TypedDict" [call-arg]
32
+
callables_kwargs.py:174: error: Unexpected keyword argument "extra_items" for "__init_subclass__" of "TypedDict" [call-arg]
33
+
callables_kwargs.py:178: error: Unexpected keyword argument "extra_items" for "__init_subclass__" of "TypedDict" [call-arg]
31
34
"""
32
35
conformance_automated = "Fail"
33
36
errors_diff = """
34
-
Line 135: Expected 1 errors
35
-
Line 184: Expected 1 errors
36
-
Line 185: Expected 1 errors
37
-
Line 145: Unexpected errors ['callables_kwargs.py:145: error: Unexpected keyword argument "closed" for "__init_subclass__" of "TypedDict" [call-arg]']
38
-
Line 149: Unexpected errors ['callables_kwargs.py:149: error: Unexpected keyword argument "extra_items" for "__init_subclass__" of "TypedDict" [call-arg]']
37
+
Line 154: Expected 1 errors
38
+
Line 206: Expected 1 errors
39
+
Line 209: Expected 1 errors
40
+
Line 215: Expected 1 errors
41
+
Line 218: Expected 1 errors
42
+
Line 231: Expected 1 errors
43
+
Line 232: Expected 1 errors
44
+
Line 234: Expected 1 errors
45
+
Line 235: Expected 1 errors
46
+
Line 23: Unexpected errors ['callables_kwargs.py:23: error: Unexpected keyword argument "closed" for "__init_subclass__" of "TypedDict" [call-arg]']
47
+
Line 27: Unexpected errors ['callables_kwargs.py:27: error: Unexpected keyword argument "extra_items" for "__init_subclass__" of "TypedDict" [call-arg]']
48
+
Line 166: Unexpected errors ['callables_kwargs.py:166: error: Unexpected keyword argument "closed" for "__init_subclass__" of "TypedDict" [call-arg]']
49
+
Line 170: Unexpected errors ['callables_kwargs.py:170: error: Unexpected keyword argument "closed" for "__init_subclass__" of "TypedDict" [call-arg]']
50
+
Line 174: Unexpected errors ['callables_kwargs.py:174: error: Unexpected keyword argument "extra_items" for "__init_subclass__" of "TypedDict" [call-arg]']
51
+
Line 178: Unexpected errors ['callables_kwargs.py:178: error: Unexpected keyword argument "extra_items" for "__init_subclass__" of "TypedDict" [call-arg]']
Does not reject passing unpacked kwargs typed with a non-closed TypedDict to a callable that has no `**kwargs`.
4
3
Does not reject passing unpacked kwargs typed with a TypedDict that has `extra_items` to a callable that has no `**kwargs`.
5
4
Does not check the `extra_items` type of unpacked kwargs against the target callable's `**kwargs` annotation.
6
5
"""
7
6
conformance_automated = "Fail"
8
7
errors_diff = """
9
-
Line 184: Expected 1 errors
10
-
Line 185: Expected 1 errors
8
+
Line 206: Expected 1 errors
9
+
Line 209: Expected 1 errors
10
+
Line 215: Expected 1 errors
11
+
Line 218: Expected 1 errors
12
+
Line 231: Expected 1 errors
13
+
Line 232: Expected 1 errors
14
+
Line 234: Expected 1 errors
15
+
Line 235: Expected 1 errors
16
+
Line 156: Unexpected errors ["`(*, v1: int, v3: str, v2: str = '') -> None` is not assignable to `TDProtocol8` [bad-assignment]"]
11
17
"""
12
18
output = """
13
-
ERROR callables_kwargs.py:47:10-12: Missing argument `v1` in function `func1` [missing-argument]
14
-
ERROR callables_kwargs.py:47:10-12: Missing argument `v3` in function `func1` [missing-argument]
15
-
ERROR callables_kwargs.py:52:32-34: Unexpected keyword argument `v4` in function `func1` [unexpected-keyword]
16
-
ERROR callables_kwargs.py:53:11-12: Expected argument `v1` to be passed by name in function `func1` [unexpected-positional-argument]
17
-
ERROR callables_kwargs.py:53:11-12: Expected 0 positional arguments, got 3 in function `func1` [bad-argument-count]
18
-
ERROR callables_kwargs.py:53:14-16: Expected argument `v3` to be passed by name in function `func1` [unexpected-positional-argument]
19
-
ERROR callables_kwargs.py:59:11-20: Unpacked keyword argument `str` is not assignable to parameter `v1` with type `int` in function `func1` [bad-argument-type]
20
-
ERROR callables_kwargs.py:64:17-22: Multiple values for argument `v1` in function `func1` [bad-keyword-argument]
21
-
ERROR callables_kwargs.py:65:11-12: Argument `Literal[1]` is not assignable to parameter `v3` with type `str` in function `func2` [bad-argument-type]
22
-
ERROR callables_kwargs.py:65:14-19: Multiple values for argument `v3` in function `func2` [bad-keyword-argument]
23
-
ERROR callables_kwargs.py:66:17-22: Multiple values for argument `v1` in function `func2` [bad-keyword-argument]
24
-
ERROR callables_kwargs.py:102:19-24: `(**kwargs: Unpack[TD2]) -> None` is not assignable to `TDProtocol3` [bad-assignment]
25
-
ERROR callables_kwargs.py:103:19-24: `(**kwargs: Unpack[TD2]) -> None` is not assignable to `TDProtocol4` [bad-assignment]
26
-
ERROR callables_kwargs.py:104:19-24: `(**kwargs: Unpack[TD2]) -> None` is not assignable to `TDProtocol5` [bad-assignment]
27
-
ERROR callables_kwargs.py:112:20-41: TypedDict key 'v1' in **kwargs overlaps with parameter 'v1' [bad-function-definition]
28
-
ERROR callables_kwargs.py:123:21-30: `Unpack` in **kwargs annotation must be used only with a `TypedDict` [invalid-annotation]
29
-
ERROR callables_kwargs.py:135:19-24: `(*, v1: int, v3: str, v2: str = '') -> None` is not assignable to `TDProtocol6` [bad-assignment]
19
+
ERROR callables_kwargs.py:55:10-12: Missing argument `v1` in function `func1` [missing-argument]
20
+
ERROR callables_kwargs.py:55:10-12: Missing argument `v3` in function `func1` [missing-argument]
21
+
ERROR callables_kwargs.py:60:32-34: Unexpected keyword argument `v4` in function `func1` [unexpected-keyword]
22
+
ERROR callables_kwargs.py:61:11-12: Expected argument `v1` to be passed by name in function `func1` [unexpected-positional-argument]
23
+
ERROR callables_kwargs.py:61:11-12: Expected 0 positional arguments, got 3 in function `func1` [bad-argument-count]
24
+
ERROR callables_kwargs.py:61:14-16: Expected argument `v3` to be passed by name in function `func1` [unexpected-positional-argument]
25
+
ERROR callables_kwargs.py:67:11-20: Unpacked keyword argument `str` is not assignable to parameter `v1` with type `int` in function `func1` [bad-argument-type]
26
+
ERROR callables_kwargs.py:72:17-22: Multiple values for argument `v1` in function `func1` [bad-keyword-argument]
27
+
ERROR callables_kwargs.py:73:11-12: Argument `Literal[1]` is not assignable to parameter `v3` with type `str` in function `func2` [bad-argument-type]
28
+
ERROR callables_kwargs.py:73:14-19: Multiple values for argument `v3` in function `func2` [bad-keyword-argument]
29
+
ERROR callables_kwargs.py:74:17-22: Multiple values for argument `v1` in function `func2` [bad-keyword-argument]
30
+
ERROR callables_kwargs.py:121:19-24: `(**kwargs: Unpack[TD2]) -> None` is not assignable to `TDProtocol3` [bad-assignment]
31
+
ERROR callables_kwargs.py:122:19-24: `(**kwargs: Unpack[TD2]) -> None` is not assignable to `TDProtocol4` [bad-assignment]
32
+
ERROR callables_kwargs.py:123:19-24: `(**kwargs: Unpack[TD2]) -> None` is not assignable to `TDProtocol5` [bad-assignment]
33
+
ERROR callables_kwargs.py:131:20-41: TypedDict key 'v1' in **kwargs overlaps with parameter 'v1' [bad-function-definition]
34
+
ERROR callables_kwargs.py:142:21-30: `Unpack` in **kwargs annotation must be used only with a `TypedDict` [invalid-annotation]
35
+
ERROR callables_kwargs.py:154:19-24: `(*, v1: int, v3: str, v2: str = '') -> None` is not assignable to `TDProtocol6` [bad-assignment]
36
+
ERROR callables_kwargs.py:156:19-24: `(*, v1: int, v3: str, v2: str = '') -> None` is not assignable to `TDProtocol8` [bad-assignment]
0 commit comments