Skip to content

[feature request] option to exclude type checking imports in ruff analyze #20736

@gwdekker

Description

@gwdekker

tach by default ignores dependencies if the import statement is wrapped by if TYPE_CHECKING:. Is that something that is possible with ruff analyze graph as well, and would you consider adding it if not yet possible? (from another thread on the issue tracker I found Grimp, which supports this with graph = grimp.build_graph('mypackage', exclude_type_checking_imports=True).

came up in #20701

@seddonym

Metadata

Metadata

Assignees

No one assigned

    Labels

    analyzeRelated to Ruff analyze functionalitywishNot on the current roadmap; maybe in the future

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions