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

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

Merged
merged 3 commits into from Jul 17, 2017

Conversation

Projects
None yet
2 participants
@ilevkivskyi
Collaborator

ilevkivskyi commented Jul 14, 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.)

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

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@gvanrossum

This comment has been minimized.

Show comment
Hide comment
@gvanrossum

gvanrossum Jul 17, 2017

Member

Thanks! LG, merging.

Member

gvanrossum commented Jul 17, 2017

Thanks! LG, merging.

@gvanrossum gvanrossum referenced this pull request Jul 18, 2017

Closed

Release mypy 0.521 #3732

gvanrossum added a commit that referenced this pull request Jul 18, 2017

Fix spurious error on acessing class names defined on self (#3719)
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