[ty] Flag illegal special form types in PEP 613 type aliases#23444
Merged
[ty] Flag illegal special form types in PEP 613 type aliases#23444
Conversation
Typing conformance results improved 🎉The percentage of diagnostics emitted that were expected errors increased from 83.87% to 83.88%. The percentage of expected errors that received a diagnostic increased from 74.82% to 74.91%. Summary
True positives addedDetails
|
|
Memory usage reportMemory usage unchanged ✅ |
AlexWaygood
approved these changes
Feb 20, 2026
| }; | ||
|
|
||
| if is_pep_613_type_alias { | ||
| let is_valid_special_form = |ty: Type<'db>| match ty { |
Member
There was a problem hiding this comment.
Could we move this up to line 9049, where we already have some basic validation in place for the right-hand side of type aliases? (Or alternatively we could move that validation down here)
Contributor
Author
There was a problem hiding this comment.
Ah, I didn't see that. Sounds like a good idea, but that's not possible because type inference on value runs in between here and there.
|
| Lint rule | Added | Removed | Changed |
|---|---|---|---|
invalid-await |
40 | 0 | 0 |
unsupported-operator |
4 | 0 | 0 |
invalid-argument-type |
2 | 0 | 0 |
unresolved-attribute |
2 | 0 | 0 |
invalid-return-type |
1 | 0 | 0 |
| Total | 49 | 0 | 0 |
knutwannheden
pushed a commit
to openrewrite/ruff
that referenced
this pull request
Feb 20, 2026
…sh#23444) ## Summary What it says in the title ## Test Plan New Markdown tests
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.
Summary
What it says in the title
Test Plan
New Markdown tests