Skip to content

Implicitly imported submodules are not always diagnosed #2271

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
gvanrossum opened this issue Oct 18, 2016 · 1 comment
Closed

Implicitly imported submodules are not always diagnosed #2271

gvanrossum opened this issue Oct 18, 2016 · 1 comment

Comments

@gvanrossum
Copy link
Member

Python has an annoying misfeature where if you write e.g. "import tornado" and then use "tornado.ioloop.IOLoop", it may or may not work depending on whether some other module has already imported "tornado.ioloop". (Here ioloop is a submodule of the tornado package, and tornado's __init__.py does not import ioloop in any form.) Currently mypy duplicates that behavior, and this backfires in incremental mode. While we could fix that, we should consider instead always diagnosing this error.

(This came up in #2036 (comment).)

@JukkaL
Copy link
Collaborator

JukkaL commented Jan 28, 2020

Closing this since there hasn't been any activity in a long time.

@JukkaL JukkaL closed this as completed Jan 28, 2020
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