Skip to content

Fix spurious error on acessing class names defined on self #3719

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 3 commits into from
Jul 17, 2017

Conversation

ilevkivskyi
Copy link
Member

Fixes #3713

The idea is just to not show an error when accessing in the class body an attribute defined on self (mypy does not distinguishes them anyway). As well, the correct node is returned on lookup, previously this resulted in some spurious Any types.

(In addition I enable two previously skipped test, just noticed them when added tests for this PR.)

@gvanrossum gvanrossum merged commit 1ed4618 into python:master Jul 17, 2017
@gvanrossum
Copy link
Member

Thanks! LG, merging.

@gvanrossum gvanrossum mentioned this pull request Jul 18, 2017
gvanrossum pushed a commit that referenced this pull request Jul 18, 2017
Fixes #3713

The idea is just to not show an error when accessing in the class body an attribute defined on ``self`` (mypy does not distinguishes them anyway). As well, the correct node is returned on lookup, previously this resulted in some spurious ``Any`` types.

(In addition I enable two previously skipped test, just noticed them when added tests for this PR.)
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.

2 participants