Skip to content

Fix fine-grained dependencies for super() #5793

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
Oct 16, 2018
Merged

Fix fine-grained dependencies for super() #5793

merged 2 commits into from
Oct 16, 2018

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