Skip to content

Submodule in 'import from' not detected when added #20799

@ilevkivskyi

Description

@ilevkivskyi

This test case still fails on master:

[case testSubmoduleAddedIncremental]
import m
[file m.py]
from a import b
[file a/__init__.py]
[file a/b.py.2]
[out]
tmp/m.py:1: error: Module "a" has no attribute "b"
[out2]

It is more tricky than other situations I fixed before, because on one hand I don't want to add something that we are not sure is a module to suppressed, but OTOH I don't want to add yet another concept (like extra_suppressed?) to cache meta.

cc @JukkaL

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions