Skip to content

Calculate implicit metaclasses - #2819

Merged
JukkaL merged 3 commits into
python:masterfrom
elazarg:implicit_metaclasses
Feb 7, 2017
Merged

JukkaL merged 3 commits into
python:masterfrom
elazarg:implicit_metaclasses

Conversation

@elazarg

@elazarg elazarg commented Feb 7, 2017

Copy link
Copy Markdown
Contributor

Fix an issue in #2475 - metaclasses are not calculated for subclasses (this is needed for Enum).

reveal_type(TA) # E: Revealed type is 'Type[__main__.A]'
reveal_type(TA.x) # E: Revealed type is 'builtins.int'

[case testMetaclassSubclass]

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.

This test case doesn't seem relevant, since it doesn't actually define a class that uses a metaclass. I checked that I get the correct output on master.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

You are right.

@JukkaL

JukkaL commented Feb 7, 2017

Copy link
Copy Markdown
Collaborator

Excellent, looks good now!

@JukkaL
JukkaL merged commit b731899 into python:master Feb 7, 2017
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