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

Allow passing a callable with type vars in self types #18401

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

A5rocks
Copy link
Contributor

@A5rocks A5rocks commented Jan 1, 2025

Fixes #18400

@ilevkivskyi I'd appreciate if you checked the logic in this PR because I enabled polymorphic inference for binding self and had to handle [T] () -> (T) -> T into () -> [T] (T) -> T... I remember seeing this kind of push down logic before, but I can't remember if there's a common function or if there is an issue with doing that.

Copy link
Contributor

github-actions bot commented Jan 1, 2025

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

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.

mypy doesn't escape typevars from generics in self-type
1 participant