Skip to content

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

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 2 commits into from
Jun 21, 2018

Conversation

ilevkivskyi
Copy link
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).

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, 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