Skip to content

lint: Fix or silence 'cyclic-import' errors and enable pylint for it

Benjamin Schubert requested to merge bschubert/lint/cyclic-import into master

Description

Cyclic imports are hard to debug and give weird errors.

We should avoid them.

The best way of avoiding them is:

  1. For plugins, import from "buildstream.*"
  2. For siblings import, import "from .sibling import X"

In order not to import from the toplevel as much as possible.

Some imports needs to be silenced, those are when our classes are factories for their children.

Changes proposed in this merge request:

  • Fix imports to not have cyclic import by not importing from "buildstream"
  • Silence circular imports that are wanted or would require significant refactor.

This merge request, when approved, will close:


Merge request reports