[ty] Emit errors on invalid TypeVar defaults#23194
Merged
charliermarsh merged 5 commits intomainfrom Feb 10, 2026
Merged
Conversation
Typing conformance results improved 🎉The percentage of diagnostics emitted that were expected errors increased from 82.45% to 82.54%. The percentage of expected errors that received a diagnostic increased from 73.38% to 73.84%. Summary
True positives addedDetails
|
|
bbec421 to
e6e0dfc
Compare
Memory usage reportSummary
Significant changesClick to expand detailed breakdownflake8
prefect
sphinx
trio
|
Member
|
(I will fix that memory report 🙃) |
e6e0dfc to
2650bd1
Compare
2650bd1 to
c214253
Compare
AlexWaygood
reviewed
Feb 10, 2026
Member
AlexWaygood
left a comment
There was a problem hiding this comment.
Thanks! I think we can make some of these diagnostics a bit more helpful for users
crates/ty_python_semantic/resources/mdtest/diagnostics/legacy_typevars.md
Show resolved
Hide resolved
...s/legacy_typevars.md_-_Legacy_typevar_creat…_-_Invalid_constrained_…_(aef6cc7e670e406f).snap
Outdated
Show resolved
Hide resolved
291173f to
5b2322c
Compare
Member
AlexWaygood
approved these changes
Feb 10, 2026
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
Implements validation for TypeVars as outlined in:
Closes astral-sh/ty#2429.