Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Deprioritize imports within a if TYPE_CHECKING: when processing import cycles #2166

Description

@JukkaL

If an import is ignored at runtime (due to being in an if TYPE_CHECKING: or if MYPY: block), it should always be considered to be of the lowest priority when sorting import cycles. This is important, in particular, since the imports could well be of form from m import ..., which are given the highest priority right now.

There is more discussion in #481.

Activity

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

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions