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 overlap check for ParamSpec types #18040

Merged
merged 1 commit into from
Oct 25, 2024
Merged

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Oct 25, 2024

ParamSpec types can match arbitrary parameter types, so treat them as having 'object' as the upper bound.

This also fixes issues with filtering of overload items based on self type.

Fixes #18036.

ParamSpec types can match arbitrary parameter types, so treat
them as having 'object' as the upper bound.

This also fixes issues with filtering of overload items based on self type.

Fixes #18036.
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 9323b88 into master Oct 25, 2024
19 checks passed
@JukkaL JukkaL deleted the fix-self-type-filtering branch October 25, 2024 11:59
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] mypy no longer recognises descriptors/get that bind self
2 participants