Skip to content
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

Fix type object with type var default in union context #17991

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Oct 18, 2024

Union type context wasn't handled previously, and it triggered false positives, but apparently only if a type object had type var defaults.

Fixes #17942.

Union type context wasn's handled previously, and it triggered false
positives, but apparently only if a type object had type var defaults.

Fixes #17942.
Copy link
Contributor

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

@JukkaL JukkaL merged commit bd2aafc into master Oct 18, 2024
18 checks passed
@JukkaL JukkaL deleted the union-type-type-context branch October 18, 2024 10:44
hauntsaninja pushed a commit to hauntsaninja/mypy that referenced this pull request Oct 18, 2024
Union type context wasn't handled previously, and it triggered false
positives, but apparently only if a type object had type var defaults.

Fixes python#17942.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[1.12 regression] New error on type[memoryView] | type[str]
2 participants