KEMBAR78
Fix fine-grained dependencies for super() by JukkaL · Pull Request #5793 · python/mypy · GitHub
Skip to content

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Oct 16, 2018

This fixes both normal and logical dependencies. We now generate
dependencies from potential target attributes in base classes. Also,
we don't generate logical dependencies based on the type object
in Python 2 style super() expressions, since they aren't
relevant.

This fixes both normal and logical dependencies. We now generate
dependencies of potential target attributes in base classes. Also,
we don't generate logical dependencies based on the type object
in Python 2 style `super()` expressions, since they aren't
relevant.
@JukkaL JukkaL changed the title Fix dependencies for super() Fix fine-grained dependencies for super() Oct 16, 2018
@JukkaL JukkaL requested a review from ilevkivskyi October 16, 2018 14:10
Copy link
Member

@ilevkivskyi ilevkivskyi left a comment

Choose a reason for hiding this comment

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

Looks good!

class D(C):
def __init__(self): # type: () -> None
super(B, self).__init__()
def mm(self): # type: () -> None
Copy link
Member

Choose a reason for hiding this comment

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

Why function signature on the same line here and above? This looks unusual.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No particular reason. I'll move them to separate lines.

@JukkaL JukkaL merged commit ea73f07 into master Oct 16, 2018
@gvanrossum gvanrossum deleted the logical-deps-super branch October 16, 2018 16:38
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