Skip to content
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

Calculate implicit metaclasses #2819

Merged
merged 3 commits into from
Feb 7, 2017
Merged

Conversation

elazarg
Copy link
Contributor

@elazarg elazarg commented Feb 7, 2017

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

@@ -2785,6 +2785,16 @@ def f(TA: Type[A]):
reveal_type(TA) # E: Revealed type is 'Type[__main__.A]'
reveal_type(TA.x) # E: Revealed type is 'builtins.int'

[case testMetaclassSubclass]
Copy link
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
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
Copy link
Collaborator

JukkaL commented Feb 7, 2017

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