Skip to content

mypy fails to recognise assignment as a form of module aliasing #1778

Closed
@Diggsey

Description

@Diggsey

Example:

# a.pyi
class Foo:
    ...
# b.py
import a

a2 = a

x = a2.Foo  # error: module has no attribute Foo

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions