|
1 | 1 | conformant = "Partial" |
2 | 2 | notes = """ |
3 | 3 | Allows callable without kwargs to be assigned to callable with unpacked kwargs. |
| 4 | +Does not support the `closed` and `extra_items` TypedDict class arguments. |
| 5 | +Does not reject passing unpacked kwargs typed with a non-closed TypedDict to a callable that has no `**kwargs`. |
| 6 | +Does not reject passing unpacked kwargs typed with a TypedDict that has `extra_items` to a callable that has no `**kwargs`. |
| 7 | +Does not check the `extra_items` type of unpacked kwargs against the target callable's `**kwargs` annotation. |
4 | 8 | """ |
5 | 9 | output = """ |
6 | | -callables_kwargs.py:46: error: Missing named argument "v1" for "func1" [call-arg] |
7 | | -callables_kwargs.py:46: error: Missing named argument "v3" for "func1" [call-arg] |
8 | | -callables_kwargs.py:51: error: Unexpected keyword argument "v4" for "func1" [call-arg] |
9 | | -callables_kwargs.py:52: error: Too many positional arguments for "func1" [misc] |
10 | | -callables_kwargs.py:58: error: Argument 1 to "func1" has incompatible type "**dict[str, str]"; expected "int" [arg-type] |
11 | | -callables_kwargs.py:61: error: Argument 1 to "func1" has incompatible type "**dict[str, object]"; expected "int" [arg-type] |
12 | | -callables_kwargs.py:61: error: Argument 1 to "func1" has incompatible type "**dict[str, object]"; expected "str" [arg-type] |
13 | | -callables_kwargs.py:63: error: "func1" gets multiple values for keyword argument "v1" [misc] |
14 | | -callables_kwargs.py:64: error: "func2" gets multiple values for keyword argument "v3" [misc] |
15 | | -callables_kwargs.py:64: error: Argument 1 to "func2" has incompatible type "int"; expected "str" [arg-type] |
16 | | -callables_kwargs.py:65: error: "func2" gets multiple values for keyword argument "v1" [misc] |
17 | | -callables_kwargs.py:101: error: Incompatible types in assignment (expression has type "def func1(**kwargs: **TD2) -> None", variable has type "TDProtocol3") [assignment] |
18 | | -callables_kwargs.py:101: note: "TDProtocol3.__call__" has type "def __call__(self, *, v1: int, v2: int, v3: str) -> None" |
19 | | -callables_kwargs.py:102: error: Incompatible types in assignment (expression has type "def func1(**kwargs: **TD2) -> None", variable has type "TDProtocol4") [assignment] |
20 | | -callables_kwargs.py:102: note: "TDProtocol4.__call__" has type "def __call__(self, *, v1: int) -> None" |
21 | | -callables_kwargs.py:103: error: Incompatible types in assignment (expression has type "def func1(**kwargs: **TD2) -> None", variable has type "TDProtocol5") [assignment] |
22 | | -callables_kwargs.py:103: note: "TDProtocol5.__call__" has type "def __call__(self, v1: int, v3: str) -> None" |
23 | | -callables_kwargs.py:111: error: Overlap between parameter names and ** TypedDict items: "v1" [misc] |
24 | | -callables_kwargs.py:122: error: Unpack item in ** parameter must be a TypedDict [misc] |
| 10 | +callables_kwargs.py:47: error: Missing named argument "v1" for "func1" [call-arg] |
| 11 | +callables_kwargs.py:47: error: Missing named argument "v3" for "func1" [call-arg] |
| 12 | +callables_kwargs.py:52: error: Unexpected keyword argument "v4" for "func1" [call-arg] |
| 13 | +callables_kwargs.py:53: error: Too many positional arguments for "func1" [misc] |
| 14 | +callables_kwargs.py:59: error: Argument 1 to "func1" has incompatible type "**dict[str, str]"; expected "int" [arg-type] |
| 15 | +callables_kwargs.py:62: error: Argument 1 to "func1" has incompatible type "**dict[str, object]"; expected "int" [arg-type] |
| 16 | +callables_kwargs.py:62: error: Argument 1 to "func1" has incompatible type "**dict[str, object]"; expected "str" [arg-type] |
| 17 | +callables_kwargs.py:64: error: "func1" gets multiple values for keyword argument "v1" [misc] |
| 18 | +callables_kwargs.py:65: error: "func2" gets multiple values for keyword argument "v3" [misc] |
| 19 | +callables_kwargs.py:65: error: Argument 1 to "func2" has incompatible type "int"; expected "str" [arg-type] |
| 20 | +callables_kwargs.py:66: error: "func2" gets multiple values for keyword argument "v1" [misc] |
| 21 | +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] |
25 | 31 | """ |
26 | 32 | conformance_automated = "Fail" |
27 | 33 | errors_diff = """ |
28 | | -Line 134: Expected 1 errors |
| 34 | +Line 135: Expected 1 errors |
| 35 | +Line 167: Expected 1 errors |
| 36 | +Line 185: Expected 1 errors |
| 37 | +Line 186: Expected 1 errors |
| 38 | +Line 145: Unexpected errors ['callables_kwargs.py:145: error: Unexpected keyword argument "closed" for "__init_subclass__" of "TypedDict" [call-arg]'] |
| 39 | +Line 149: Unexpected errors ['callables_kwargs.py:149: error: Unexpected keyword argument "extra_items" for "__init_subclass__" of "TypedDict" [call-arg]'] |
29 | 40 | """ |
0 commit comments