Skip to content

Imports from other modules not detected in modules #1935

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

Closed
TRManderson opened this issue Jul 25, 2016 · 3 comments
Closed

Imports from other modules not detected in modules #1935

TRManderson opened this issue Jul 25, 2016 · 3 comments

Comments

@TRManderson
Copy link
Contributor

TRManderson commented Jul 25, 2016

Let's say there are three modules:

test/__init__.py:

from test.a import A
from test.b import B

test/a.py:

class A: pass

test/b.py:

from test import A
class B: pass

Using mypy 0.4.3 mypy -p test will report
test/b.py:1: error: Module has no attribute 'A'

@TRManderson
Copy link
Contributor Author

This issue is poorly named, can someone suggest a better title?

@gvanrossum
Copy link
Member

Looks like you found another problem with import cycles. B depends on
init and vice versa. I think we have a few issues for such things
already.

On Sunday, July 24, 2016, Tom Manderson <[email protected]
javascript:_e(%7B%7D,'cvml','[email protected]');> wrote:

This issue is poorly named, can someone suggest a better title?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#1935 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACwrMtRt5rA2o-i6mIsEO6YJMu-zOhygks5qZET7gaJpZM4JTyrm
.

--Guido (mobile)

@gvanrossum gvanrossum added this to the Future milestone Sep 1, 2016
@gvanrossum
Copy link
Member

Closing as a duplicate of #481.

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

No branches or pull requests

2 participants