Skip to content

Fix PEP 695 type alias with mix of type args (PEP 696) #18919

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

Merged
merged 1 commit into from
Apr 17, 2025

Conversation

cdce8p
Copy link
Collaborator

@cdce8p cdce8p commented Apr 13, 2025

Fix an issue where TypeVar defaults wouldn't be applied to PEP 695 type aliases.
Fixes #18921

@cdce8p cdce8p added topic-pep-696 TypeVar defaults topic-pep-695 Issues related to PEP 695 syntax bug mypy got something wrong and removed bug mypy got something wrong labels Apr 13, 2025
Copy link
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

Copy link
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@JukkaL JukkaL merged commit 9a52273 into python:master Apr 17, 2025
18 checks passed
@cdce8p cdce8p deleted the fix-696-type-alias branch April 17, 2025 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-pep-695 Issues related to PEP 695 syntax topic-pep-696 TypeVar defaults
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Typevar defaults not applied to new style type alias
2 participants