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

Add missing dependency from missing module attribute #5861

merged 2 commits into from Nov 1, 2018


None yet
2 participants
Copy link

JukkaL commented Oct 31, 2018

Fixes #4782.

@JukkaL JukkaL requested a review from ilevkivskyi Oct 31, 2018

Copy link

ilevkivskyi left a comment

A nice simple solution. I have two suggestions.

<a.C.x> -> m
<a.C> -> m

This comment has been minimized.


ilevkivskyi Oct 31, 2018


I would add a fine grained test too, so that it will not regress for other (non dependency caused) reasons.

@@ -604,6 +604,10 @@ def visit_member_expr(self, e: MemberExpr) -> None:
# No type available -- this happens for unreachable code. Since it's unreachable,
# it wasn't type checked and we don't need to generate dependencies.
if isinstance(e.expr, RefExpr) and isinstance(e.expr.node, MypyFile):
# Special case: reference to a missing module attribute.

This comment has been minimized.


ilevkivskyi Oct 31, 2018


I would also update the comment few lines above (can't comment there):

# Reference to a non-module attribute -> # Reference to a non-module (or missing) attribute

@JukkaL JukkaL merged commit 0b61e54 into master Nov 1, 2018

2 checks passed

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

@gvanrossum gvanrossum deleted the fg-ignore-attr branch Nov 14, 2018

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