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

Better handling of generic functions in partial plugin #17925

Merged
merged 2 commits into from
Oct 14, 2024

Conversation

ilevkivskyi
Copy link
Member

Fixes #17411

The fix is that we remove type variables that can never be inferred from the initial check_call() call. Actual diff is tiny, I just moved a bunch of code, since I need formal to actual mapping sooner now.

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

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Thank you!

@hauntsaninja hauntsaninja merged commit 1a074b6 into python:master Oct 14, 2024
18 checks passed
JukkaL pushed a commit that referenced this pull request Oct 14, 2024
Fixes #17411

The fix is that we remove type variables that can never be inferred from
the initial `check_call()` call. Actual diff is tiny, I just moved a
bunch of code, since I need formal to actual mapping sooner now.
@ilevkivskyi ilevkivskyi deleted the fix-partial-generic branch October 14, 2024 09:32
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.

functools.partial incorrectly handles constrained generic function arguments
2 participants