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

Fix fine-grained dependencies for super() #5793

Merged
merged 2 commits into from Oct 16, 2018

Conversation

Projects
None yet
2 participants
@JukkaL
Copy link
Collaborator

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.

Fix dependencies for super()
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 Oct 16, 2018

@ilevkivskyi
Copy link
Collaborator

ilevkivskyi left a comment

Looks good!

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

This comment has been minimized.

@ilevkivskyi

ilevkivskyi Oct 16, 2018

Collaborator

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

This comment has been minimized.

@JukkaL

JukkaL Oct 16, 2018

Collaborator

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

@JukkaL JukkaL merged commit ea73f07 into master Oct 16, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@gvanrossum gvanrossum deleted the logical-deps-super branch Oct 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment