Skip to content

Add test that prevents increasing import cycles in the mypy implementation #7407

Open
@JukkaL

Description

@JukkaL

It's easy to accidentally introduce new modules in import cycles, which can make the structure of the codebase worse and slow down incremental builds. Add a test that checks that this does not happen.

See #7397 for context. Here is one idea from that PR:

We could perhaps run another incremental build after self check in verbose mode and assert that the largest import cycle is below some size limit by parsing the verbose output. Alternatively, we could modify verbose mode to write more details about SCCs in incremental mode and make more specific assertions, such as requiring that the nodes, typeops and checker cycles are disjoint.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions