KEMBAR78
Use union component as a self-type in class methods by ilevkivskyi · Pull Request #7822 · python/mypy · GitHub
Skip to content

Conversation

ilevkivskyi
Copy link
Member

@ilevkivskyi ilevkivskyi commented Oct 30, 2019

Fixes #7821

The same logic is already used for normal methods, I think class methods should be no different.

@ilevkivskyi ilevkivskyi requested a review from JukkaL October 30, 2019 11:25
Copy link
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

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

LGTM!

@ilevkivskyi ilevkivskyi merged commit 7e7b1e4 into python:master Oct 30, 2019
@ilevkivskyi ilevkivskyi deleted the fix-union-self-classmethod branch October 30, 2019 12:30
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.

Self-type in class method doesn't work on unions

2 participants