KEMBAR78
Fix spurious error on acessing class names defined on self by ilevkivskyi · Pull Request #3719 · python/mypy · GitHub
Skip to content

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