Skip to content

from .a import b in an __init__.pyi could also be a re-export of b #1486

@Gankra

Description

@Gankra

This is a followup to astral-sh/ruff#21173 and pertains to behaviours described in imports/nonstandard_conventions.md

Currently we consider from . import b in an __init__.pyi a re-export idiom (equivalent to from . import b as b).

We could generalize this to from .a import b as well, although that's a bit less explicit.

Metadata

Metadata

Assignees

Labels

importsModule resolution, site-packages discovery, import-related diagnostics

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions