Skip to content

Implicitly imported submodules are not always diagnosed #2271

Closed

Description

@gvanrossum

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).)

Activity

  1. added this to the milestone on Oct 20, 2016
  2. removed this from the milestone on Mar 29, 2017
  3. JukkaL commented on Jan 28, 2020

    @JukkaL
    Collaborator

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

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions