-
Notifications
You must be signed in to change notification settings - Fork 303
Update unpack TypedDict kwargs forwarding spec + add conformance tests #2338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
yangdanny97
wants to merge
9
commits into
python:main
Choose a base branch
from
yangdanny97:typeddict-kwargs-passing
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
bac5494
update typeddict kwarg forwarding test
yangdanny97 d77ae67
update spec wording and results to make erroring on implicitly open T…
yangdanny97 83e5a9f
link to terms & handle implicitly open typeddicts the same as explici…
yangdanny97 f9e6374
address reviewer comments, revise spec and add a bunch of test cases
yangdanny97 5f91c0a
modify notes
yangdanny97 08142e8
add additional conformance test cases
yangdanny97 770b585
change wording from may -> should, make error required
yangdanny97 4255a24
regenerate conformance
yangdanny97 be20dec
update notes
yangdanny97 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,29 +1,67 @@ | ||
| conformant = "Partial" | ||
| notes = """ | ||
| Allows callable without kwargs to be assigned to callable with unpacked kwargs. | ||
| Does not support the `closed` and `extra_items` TypedDict class arguments. | ||
| Does not reject unpacking an open TypedDict in a call to a callable that has no `**kwargs`. | ||
| Does not check the type of an unpacked TypedDict's extra items against the target callable's `**kwargs` annotation. | ||
| Does not check the type of an unpacked TypedDict's extra items against the target callable's named keyword parameters. | ||
| Does not reject unpacking a TypedDict that sets `extra_items` in a call to a callable that has no `**kwargs`. | ||
| Does not reject unpacking a TypedDict that sets `extra_items` in a call to a callable whose `**kwargs` is typed with a closed TypedDict. | ||
| """ | ||
| output = """ | ||
| callables_kwargs.py:46: error: Missing named argument "v1" for "func1" [call-arg] | ||
| callables_kwargs.py:46: error: Missing named argument "v3" for "func1" [call-arg] | ||
| callables_kwargs.py:51: error: Unexpected keyword argument "v4" for "func1" [call-arg] | ||
| callables_kwargs.py:52: error: Too many positional arguments for "func1" [misc] | ||
| callables_kwargs.py:58: error: Argument 1 to "func1" has incompatible type "**dict[str, str]"; expected "int" [arg-type] | ||
| callables_kwargs.py:61: error: Argument 1 to "func1" has incompatible type "**dict[str, object]"; expected "int" [arg-type] | ||
| callables_kwargs.py:61: error: Argument 1 to "func1" has incompatible type "**dict[str, object]"; expected "str" [arg-type] | ||
| callables_kwargs.py:63: error: "func1" gets multiple values for keyword argument "v1" [misc] | ||
| callables_kwargs.py:64: error: "func2" gets multiple values for keyword argument "v3" [misc] | ||
| callables_kwargs.py:64: error: Argument 1 to "func2" has incompatible type "int"; expected "str" [arg-type] | ||
| callables_kwargs.py:65: error: "func2" gets multiple values for keyword argument "v1" [misc] | ||
| callables_kwargs.py:101: error: Incompatible types in assignment (expression has type "def func1(**kwargs: **TD2) -> None", variable has type "TDProtocol3") [assignment] | ||
| callables_kwargs.py:101: note: "TDProtocol3.__call__" has type "def __call__(self, *, v1: int, v2: int, v3: str) -> None" | ||
| callables_kwargs.py:102: error: Incompatible types in assignment (expression has type "def func1(**kwargs: **TD2) -> None", variable has type "TDProtocol4") [assignment] | ||
| callables_kwargs.py:102: note: "TDProtocol4.__call__" has type "def __call__(self, *, v1: int) -> None" | ||
| callables_kwargs.py:103: error: Incompatible types in assignment (expression has type "def func1(**kwargs: **TD2) -> None", variable has type "TDProtocol5") [assignment] | ||
| callables_kwargs.py:103: note: "TDProtocol5.__call__" has type "def __call__(self, v1: int, v3: str) -> None" | ||
| callables_kwargs.py:111: error: Overlap between parameter names and ** TypedDict items: "v1" [misc] | ||
| callables_kwargs.py:122: error: Unpack item in ** parameter must be a TypedDict [misc] | ||
| callables_kwargs.py:23: error: Unexpected keyword argument "closed" for "__init_subclass__" of "TypedDict" [call-arg] | ||
| callables_kwargs.py:27: error: Unexpected keyword argument "extra_items" for "__init_subclass__" of "TypedDict" [call-arg] | ||
| callables_kwargs.py:55: error: Missing named argument "v1" for "func1" [call-arg] | ||
| callables_kwargs.py:55: error: Missing named argument "v3" for "func1" [call-arg] | ||
| callables_kwargs.py:60: error: Unexpected keyword argument "v4" for "func1" [call-arg] | ||
| callables_kwargs.py:61: error: Too many positional arguments for "func1" [misc] | ||
| callables_kwargs.py:67: error: Argument 1 to "func1" has incompatible type "**dict[str, str]"; expected "int" [arg-type] | ||
| callables_kwargs.py:70: error: Argument 1 to "func1" has incompatible type "**dict[str, object]"; expected "int" [arg-type] | ||
| callables_kwargs.py:70: error: Argument 1 to "func1" has incompatible type "**dict[str, object]"; expected "str" [arg-type] | ||
| callables_kwargs.py:72: error: "func1" gets multiple values for keyword argument "v1" [misc] | ||
| callables_kwargs.py:73: error: "func2" gets multiple values for keyword argument "v3" [misc] | ||
| callables_kwargs.py:73: error: Argument 1 to "func2" has incompatible type "int"; expected "str" [arg-type] | ||
| callables_kwargs.py:74: error: "func2" gets multiple values for keyword argument "v1" [misc] | ||
| callables_kwargs.py:121: error: Incompatible types in assignment (expression has type "def func1(**kwargs: **TD2) -> None", variable has type "TDProtocol3") [assignment] | ||
| callables_kwargs.py:121: note: "TDProtocol3.__call__" has type "def __call__(self, *, v1: int, v2: int, v3: str) -> None" | ||
| callables_kwargs.py:122: error: Incompatible types in assignment (expression has type "def func1(**kwargs: **TD2) -> None", variable has type "TDProtocol4") [assignment] | ||
| callables_kwargs.py:122: note: "TDProtocol4.__call__" has type "def __call__(self, *, v1: int) -> None" | ||
| callables_kwargs.py:123: error: Incompatible types in assignment (expression has type "def func1(**kwargs: **TD2) -> None", variable has type "TDProtocol5") [assignment] | ||
| callables_kwargs.py:123: note: "TDProtocol5.__call__" has type "def __call__(self, v1: int, v3: str) -> None" | ||
| callables_kwargs.py:131: error: Overlap between parameter names and ** TypedDict items: "v1" [misc] | ||
| callables_kwargs.py:142: error: Unpack item in ** parameter must be a TypedDict [misc] | ||
| callables_kwargs.py:166: error: Unexpected keyword argument "closed" for "__init_subclass__" of "TypedDict" [call-arg] | ||
| callables_kwargs.py:170: error: Unexpected keyword argument "closed" for "__init_subclass__" of "TypedDict" [call-arg] | ||
| callables_kwargs.py:174: error: Unexpected keyword argument "extra_items" for "__init_subclass__" of "TypedDict" [call-arg] | ||
| callables_kwargs.py:178: error: Unexpected keyword argument "extra_items" for "__init_subclass__" of "TypedDict" [call-arg] | ||
| """ | ||
| conformance_automated = "Fail" | ||
| errors_diff = """ | ||
| Line 134: Expected 1 errors | ||
| Line 154: Expected 1 errors | ||
| Line 210: Expected 1 errors | ||
| Line 212: Expected 1 errors | ||
| Line 213: Expected 1 errors | ||
| Line 215: Expected 1 errors | ||
| Line 216: Expected 1 errors | ||
| Line 217: Expected 1 errors | ||
| Line 221: Expected 1 errors | ||
| Line 223: Expected 1 errors | ||
| Line 224: Expected 1 errors | ||
| Line 226: Expected 1 errors | ||
| Line 227: Expected 1 errors | ||
| Line 228: Expected 1 errors | ||
| Line 243: Expected 1 errors | ||
| Line 244: Expected 1 errors | ||
| Line 246: Expected 1 errors | ||
| Line 247: Expected 1 errors | ||
| Line 249: Expected 1 errors | ||
| Line 250: Expected 1 errors | ||
| Line 251: Expected 1 errors | ||
| Line 252: Expected 1 errors | ||
| Line 23: Unexpected errors ['callables_kwargs.py:23: error: Unexpected keyword argument "closed" for "__init_subclass__" of "TypedDict" [call-arg]'] | ||
| Line 27: Unexpected errors ['callables_kwargs.py:27: error: Unexpected keyword argument "extra_items" for "__init_subclass__" of "TypedDict" [call-arg]'] | ||
| Line 166: Unexpected errors ['callables_kwargs.py:166: error: Unexpected keyword argument "closed" for "__init_subclass__" of "TypedDict" [call-arg]'] | ||
| Line 170: Unexpected errors ['callables_kwargs.py:170: error: Unexpected keyword argument "closed" for "__init_subclass__" of "TypedDict" [call-arg]'] | ||
| Line 174: Unexpected errors ['callables_kwargs.py:174: error: Unexpected keyword argument "extra_items" for "__init_subclass__" of "TypedDict" [call-arg]'] | ||
| Line 178: Unexpected errors ['callables_kwargs.py:178: error: Unexpected keyword argument "extra_items" for "__init_subclass__" of "TypedDict" [call-arg]'] | ||
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,48 @@ | ||
| conformance_automated = "Pass" | ||
| conformant = "Partial" | ||
| notes = """ | ||
| Does not check the type of an unpacked TypedDict's extra items against the target callable's `**kwargs` annotation. | ||
| Does not check the type of an unpacked TypedDict's extra items against the target callable's named keyword parameters. | ||
| Does not reject unpacking a TypedDict that sets `extra_items` in a call to a callable that has no `**kwargs`. | ||
| Does not reject unpacking an open TypedDict in a call to a callable that has no `**kwargs`. | ||
| Does not reject unpacking a TypedDict that sets `extra_items` in a call to a callable whose `**kwargs` is typed with a closed TypedDict. | ||
| Incorrectly rejects assigning a callable without `**kwargs` to a callable whose `**kwargs` is typed with a closed TypedDict or one that sets `extra_items=Never`. | ||
| """ | ||
| conformance_automated = "Fail" | ||
| errors_diff = """ | ||
| Line 210: Expected 1 errors | ||
| Line 213: Expected 1 errors | ||
| Line 216: Expected 1 errors | ||
| Line 217: Expected 1 errors | ||
| Line 221: Expected 1 errors | ||
| Line 224: Expected 1 errors | ||
| Line 227: Expected 1 errors | ||
| Line 228: Expected 1 errors | ||
| """ | ||
| output = """ | ||
| ./callables_kwargs.py:46:4: In call to callables_kwargs.func1: Missing required argument 'v1' [incompatible_call] | ||
| ./callables_kwargs.py:51:4: In call to callables_kwargs.func1: Got an unexpected keyword argument 'v4' [incompatible_call] | ||
| ./callables_kwargs.py:52:4: In call to callables_kwargs.func1: Missing required argument 'v1' [incompatible_call] | ||
| ./callables_kwargs.py:58:4: Incompatible argument type for v1: expected int but got str [incompatible_argument] | ||
| ./callables_kwargs.py:61:4: In call to callables_kwargs.func1: Got an unexpected keyword argument 'v4' [incompatible_call] | ||
| ./callables_kwargs.py:63:4: Multiple values provided for argument 'v1' [incompatible_call] | ||
| ./callables_kwargs.py:64:4: In call to callables_kwargs.func2: Parameter 'v3' provided as both a positional and a keyword argument [incompatible_call] | ||
| ./callables_kwargs.py:65:4: Multiple values provided for argument 'v1' [incompatible_call] | ||
| ./callables_kwargs.py:101:0: Incompatible assignment: expected callables_kwargs.TDProtocol3, got function 'callables_kwargs.func1' [incompatible_assignment] | ||
| ./callables_kwargs.py:102:0: Incompatible assignment: expected callables_kwargs.TDProtocol4, got function 'callables_kwargs.func1' [incompatible_assignment] | ||
| ./callables_kwargs.py:103:0: Incompatible assignment: expected callables_kwargs.TDProtocol5, got function 'callables_kwargs.func1' [incompatible_assignment] | ||
| ./callables_kwargs.py:111:21: Parameter v1 overlaps with TypedDict key in **kwargs [invalid_annotation] | ||
| ./callables_kwargs.py:122:12: Expected TypedDict type inside Unpack[] for **kwargs [invalid_annotation] | ||
| ./callables_kwargs.py:134:0: Incompatible assignment: expected callables_kwargs.TDProtocol6, got function 'callables_kwargs.func7' [incompatible_assignment] | ||
| ./callables_kwargs.py:55:4: In call to callables_kwargs.func1: Missing required argument 'v1' [incompatible_call] | ||
| ./callables_kwargs.py:60:4: In call to callables_kwargs.func1: Got an unexpected keyword argument 'v4' [incompatible_call] | ||
| ./callables_kwargs.py:61:4: In call to callables_kwargs.func1: Missing required argument 'v1' [incompatible_call] | ||
| ./callables_kwargs.py:67:4: Incompatible argument type for v1: expected int but got str [incompatible_argument] | ||
| ./callables_kwargs.py:70:4: In call to callables_kwargs.func1: Got an unexpected keyword argument 'v4' [incompatible_call] | ||
| ./callables_kwargs.py:72:4: Multiple values provided for argument 'v1' [incompatible_call] | ||
| ./callables_kwargs.py:73:4: In call to callables_kwargs.func2: Parameter 'v3' provided as both a positional and a keyword argument [incompatible_call] | ||
| ./callables_kwargs.py:74:4: Multiple values provided for argument 'v1' [incompatible_call] | ||
| ./callables_kwargs.py:121:0: Incompatible assignment: expected callables_kwargs.TDProtocol3, got function 'callables_kwargs.func1' [incompatible_assignment] | ||
| ./callables_kwargs.py:122:0: Incompatible assignment: expected callables_kwargs.TDProtocol4, got function 'callables_kwargs.func1' [incompatible_assignment] | ||
| ./callables_kwargs.py:123:0: Incompatible assignment: expected callables_kwargs.TDProtocol5, got function 'callables_kwargs.func1' [incompatible_assignment] | ||
| ./callables_kwargs.py:131:21: Parameter v1 overlaps with TypedDict key in **kwargs [invalid_annotation] | ||
| ./callables_kwargs.py:142:12: Expected TypedDict type inside Unpack[] for **kwargs [invalid_annotation] | ||
| ./callables_kwargs.py:154:0: Incompatible assignment: expected callables_kwargs.TDProtocol6, got function 'callables_kwargs.func7' [incompatible_assignment] | ||
| ./callables_kwargs.py:212:4: Incompatible argument type for kwargs: expected dict[str, str] but got <dict containing {**{str?: object}}> [incompatible_argument] | ||
| ./callables_kwargs.py:215:4: Incompatible argument type for kwargs: expected dict[str, str] but got <dict containing {**{str?: object}}> [incompatible_argument] | ||
| ./callables_kwargs.py:223:4: Incompatible argument type for kwargs: expected dict[str, str] but got <dict containing {**{str?: object}}> [incompatible_argument] | ||
| ./callables_kwargs.py:226:4: Incompatible argument type for kwargs: expected dict[str, str] but got <dict containing {**{str?: object}}> [incompatible_argument] | ||
| ./callables_kwargs.py:243:4: In call to callables_kwargs.takes_name: **kwargs provided but not used [incompatible_call] | ||
| ./callables_kwargs.py:244:4: Incompatible argument type for kwargs: expected dict[str, str] but got <dict containing {**{str: int}}> [incompatible_argument] | ||
| ./callables_kwargs.py:246:4: In call to callables_kwargs.takes_name: **kwargs provided but not used [incompatible_call] | ||
| ./callables_kwargs.py:247:4: Incompatible argument type for kwargs: expected dict[str, str] but got <dict containing {**{str: int}}> [incompatible_argument] | ||
| ./callables_kwargs.py:249:4: In call to callables_kwargs.takes_closed: **kwargs provided but not used [incompatible_call] | ||
| ./callables_kwargs.py:250:4: In call to callables_kwargs.takes_closed: **kwargs provided but not used [incompatible_call] | ||
| ./callables_kwargs.py:251:4: Incompatible argument type for label: expected str but got int [incompatible_argument] | ||
| ./callables_kwargs.py:252:4: Incompatible argument type for label: expected str but got int [incompatible_argument] | ||
| """ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,53 @@ | ||
| conformant = "Pass" | ||
| conformance_automated = "Pass" | ||
| conformant = "Partial" | ||
| notes = """ | ||
| Does not check the type of an unpacked TypedDict's extra items against the target callable's `**kwargs` annotation. | ||
| Does not check the type of an unpacked TypedDict's extra items against the target callable's named keyword parameters. | ||
| Does not reject unpacking a TypedDict that sets `extra_items` in a call to a callable that has no `**kwargs`. | ||
| Does not reject unpacking an open TypedDict in a call to a callable that has no `**kwargs`. | ||
| Does not reject unpacking a TypedDict that sets `extra_items` in a call to a callable whose `**kwargs` is typed with a closed TypedDict. | ||
| Incorrectly rejects assigning a callable without `**kwargs` to a callable whose `**kwargs` is typed with a TypedDict that sets `extra_items=Never`. | ||
| """ | ||
| conformance_automated = "Fail" | ||
| errors_diff = """ | ||
| Line 210: Expected 1 errors | ||
| Line 212: Expected 1 errors | ||
| Line 213: Expected 1 errors | ||
| Line 215: Expected 1 errors | ||
| Line 216: Expected 1 errors | ||
| Line 217: Expected 1 errors | ||
| Line 221: Expected 1 errors | ||
| Line 223: Expected 1 errors | ||
| Line 224: Expected 1 errors | ||
| Line 226: Expected 1 errors | ||
| Line 227: Expected 1 errors | ||
| Line 228: Expected 1 errors | ||
| Line 243: Expected 1 errors | ||
| Line 244: Expected 1 errors | ||
| Line 246: Expected 1 errors | ||
| Line 247: Expected 1 errors | ||
| Line 249: Expected 1 errors | ||
| Line 250: Expected 1 errors | ||
| Line 251: Expected 1 errors | ||
| Line 252: Expected 1 errors | ||
| Line 156: Unexpected errors ["`(*, v1: int, v3: str, v2: str = '') -> None` is not assignable to `TDProtocol8` [bad-assignment]"] | ||
| """ | ||
| output = """ | ||
| ERROR callables_kwargs.py:46:10-12: Missing argument `v1` in function `func1` [missing-argument] | ||
| ERROR callables_kwargs.py:46:10-12: Missing argument `v3` in function `func1` [missing-argument] | ||
| ERROR callables_kwargs.py:51:32-34: Unexpected keyword argument `v4` in function `func1` [unexpected-keyword] | ||
| ERROR callables_kwargs.py:52:11-12: Expected argument `v1` to be passed by name in function `func1` [unexpected-positional-argument] | ||
| ERROR callables_kwargs.py:52:11-12: Expected 0 positional arguments, got 3 in function `func1` [bad-argument-count] | ||
| ERROR callables_kwargs.py:52:14-16: Expected argument `v3` to be passed by name in function `func1` [unexpected-positional-argument] | ||
| ERROR callables_kwargs.py:58:11-20: Unpacked keyword argument `str` is not assignable to parameter `v1` with type `int` in function `func1` [bad-argument-type] | ||
| ERROR callables_kwargs.py:63:17-22: Multiple values for argument `v1` in function `func1` [bad-keyword-argument] | ||
| ERROR callables_kwargs.py:64:11-12: Argument `Literal[1]` is not assignable to parameter `v3` with type `str` in function `func2` [bad-argument-type] | ||
| ERROR callables_kwargs.py:64:14-19: Multiple values for argument `v3` in function `func2` [bad-keyword-argument] | ||
| ERROR callables_kwargs.py:65:17-22: Multiple values for argument `v1` in function `func2` [bad-keyword-argument] | ||
| ERROR callables_kwargs.py:101:19-24: `(**kwargs: Unpack[TD2]) -> None` is not assignable to `TDProtocol3` [bad-assignment] | ||
| ERROR callables_kwargs.py:102:19-24: `(**kwargs: Unpack[TD2]) -> None` is not assignable to `TDProtocol4` [bad-assignment] | ||
| ERROR callables_kwargs.py:103:19-24: `(**kwargs: Unpack[TD2]) -> None` is not assignable to `TDProtocol5` [bad-assignment] | ||
| ERROR callables_kwargs.py:111:20-41: TypedDict key 'v1' in **kwargs overlaps with parameter 'v1' [bad-function-definition] | ||
| ERROR callables_kwargs.py:122:21-30: `Unpack` in **kwargs annotation must be used only with a `TypedDict` [invalid-annotation] | ||
| ERROR callables_kwargs.py:134:19-24: `(*, v1: int, v3: str, v2: str = '') -> None` is not assignable to `TDProtocol6` [bad-assignment] | ||
| ERROR callables_kwargs.py:55:10-12: Missing argument `v1` in function `func1` [missing-argument] | ||
| ERROR callables_kwargs.py:55:10-12: Missing argument `v3` in function `func1` [missing-argument] | ||
| ERROR callables_kwargs.py:60:32-34: Unexpected keyword argument `v4` in function `func1` [unexpected-keyword] | ||
| ERROR callables_kwargs.py:61:11-12: Expected argument `v1` to be passed by name in function `func1` [unexpected-positional-argument] | ||
| ERROR callables_kwargs.py:61:11-12: Expected 0 positional arguments, got 3 in function `func1` [bad-argument-count] | ||
| ERROR callables_kwargs.py:61:14-16: Expected argument `v3` to be passed by name in function `func1` [unexpected-positional-argument] | ||
| 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] | ||
| ERROR callables_kwargs.py:72:17-22: Multiple values for argument `v1` in function `func1` [bad-keyword-argument] | ||
| 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] | ||
| ERROR callables_kwargs.py:73:14-19: Multiple values for argument `v3` in function `func2` [bad-keyword-argument] | ||
| ERROR callables_kwargs.py:74:17-22: Multiple values for argument `v1` in function `func2` [bad-keyword-argument] | ||
| ERROR callables_kwargs.py:121:19-24: `(**kwargs: Unpack[TD2]) -> None` is not assignable to `TDProtocol3` [bad-assignment] | ||
| ERROR callables_kwargs.py:122:19-24: `(**kwargs: Unpack[TD2]) -> None` is not assignable to `TDProtocol4` [bad-assignment] | ||
| ERROR callables_kwargs.py:123:19-24: `(**kwargs: Unpack[TD2]) -> None` is not assignable to `TDProtocol5` [bad-assignment] | ||
| ERROR callables_kwargs.py:131:20-41: TypedDict key 'v1' in **kwargs overlaps with parameter 'v1' [bad-function-definition] | ||
| ERROR callables_kwargs.py:142:21-30: `Unpack` in **kwargs annotation must be used only with a `TypedDict` [invalid-annotation] | ||
| ERROR callables_kwargs.py:154:19-24: `(*, v1: int, v3: str, v2: str = '') -> None` is not assignable to `TDProtocol6` [bad-assignment] | ||
| ERROR callables_kwargs.py:156:19-24: `(*, v1: int, v3: str, v2: str = '') -> None` is not assignable to `TDProtocol8` [bad-assignment] | ||
| """ |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think need to update these notes to match the regenerated output.
The recorded diagnostics show that these checks now work: incompatible extra-item values are rejected, extra items are checked against optional named parameters, declared extras are rejected when the destination cannot accept them, and the closed/
extra_items=Nevercallable assignments are accepted.The only remaining misses in this test are the eight open-source unpacking diagnostics listed in
errors_diff. I think we can remove the other claimed failures here.