[ty] Improve support for kwarg splats in dictionary literals#22781
Merged
ibraheemdev merged 2 commits intomainfrom Jan 21, 2026
Merged
[ty] Improve support for kwarg splats in dictionary literals#22781ibraheemdev merged 2 commits intomainfrom
ibraheemdev merged 2 commits intomainfrom
Conversation
Typing conformance resultsNo changes detected ✅ |
|
|
| Lint rule | Added | Removed | Changed |
|---|---|---|---|
invalid-argument-type |
15 | 4 | 3 |
invalid-return-type |
5 | 0 | 5 |
invalid-assignment |
2 | 0 | 6 |
invalid-await |
2 | 0 | 6 |
possibly-missing-attribute |
3 | 0 | 3 |
unused-ignore-comment |
2 | 1 | 0 |
not-subscriptable |
0 | 0 | 2 |
unresolved-attribute |
0 | 0 | 2 |
| Total | 29 | 5 | 27 |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
dhruvmanila
reviewed
Jan 21, 2026
Comment on lines
-3591
to
-3593
| // TODO: Instead of calling the `keys` and `__getitem__` methods, we should | ||
| // instead get the constraints which satisfies the `SupportsKeysAndGetItem` | ||
| // protocol i.e., the key and value type. |
Member
There was a problem hiding this comment.
Should this TODO be moved to the new function unpack_keys_and_items?
Member
There was a problem hiding this comment.
I'm not sure I agree with the todo 😆 I think the current way of doing it is fine and may be more efficient and/or less code even when we support generic protocols in the generics solver
AlexWaygood
approved these changes
Jan 21, 2026
Member
AlexWaygood
left a comment
There was a problem hiding this comment.
Code looks good (with one question); haven't looked at the ecosystem report though
Member
Author
|
The relevant ecosystem changes all look good to me. Some instances of astral-sh/ty#1248, but those are unrelated. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Resolves astral-sh/ty#1332.