Skip to content

Make it easier to work with circular module dependencies #481

Closed
@JukkaL

Description

@JukkaL

It's sometimes painful to work around issues related to circular module dependencies. Some examples:

  • Mypy complains about not being able to infer a type because of a circular dependency.
  • Mypy type checks okay but at runtime something is undefined because of a circular dependency.
  • A type annotation introduces a circular module dependency where there was none before.

Not sure how these should be resolved. Some ideas:

  • Add a flag that dumps information about any circular module dependencies in the target program. This should help with debugging.
  • Warn about 'from imports' that are part of a circular module dependency, as these could fail at runtime.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions