Skip to content

Make constraint inference in bind_self() more principled #7938

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 2 commits into from
Nov 12, 2019

Conversation

ilevkivskyi
Copy link
Member

Fixes #7925

This PR:

  • Moves TypeVarExtractor to typeops.py
  • Infers and applies all and only type variables that appear in an explicit self type (instead of just always the first one as currently)

Copy link
Collaborator

@msullivan msullivan left a comment

Choose a reason for hiding this comment

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

Looks good.

I am also somewhat confused about the UninhabitedType checks here, but I don't think that's a blocker

@msullivan msullivan merged commit 1b798e4 into python:master Nov 12, 2019
@ilevkivskyi ilevkivskyi deleted the fix-bind-self branch November 13, 2019 12:18
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.

Regression involving generic class methods
2 participants