Skip to content

Retrieve class or static info from node instead of type - #5261

Merged
ilevkivskyi merged 2 commits into
python:masterfrom
ilevkivskyi:fix-classmethod-super
Jun 21, 2018
Merged

ilevkivskyi merged 2 commits into
python:masterfrom
ilevkivskyi:fix-classmethod-super

Conversation

@ilevkivskyi

Copy link
Copy Markdown
Member

Fixes #5259

This partially undo changes made in https://github.com/python/mypy/pull/5224/files. It is more safe to retrieve class and static flags directly from nodes, since callable types have often definition not set (especially after de-serialization). Also being class or static method is not really a property of type itself, it is rather an "access flag" for a given name in symbol table (similar to how a variable can be settable).

@JukkaL JukkaL left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, thanks for fixing this!

@ilevkivskyi
ilevkivskyi merged commit a55635d into python:master Jun 21, 2018
@ilevkivskyi
ilevkivskyi deleted the fix-classmethod-super branch June 21, 2018 18:02
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