Circular dependencies between ``astroid.nodes`` and ``astroid.bases``
Pierre-Sassoulas opened this issue · 0 comments
Pierre-Sassoulas commented
In order to remove the deprecated astroid.nodes_classes
and astroid.scoped_nodes
we're going to have to resolve this circular dependencies.
bases.py
:
from astroid.nodes.node_classes import Name, Const, NodeNG, Call, Attribute, EmptyNode, const_factory
from astroid.nodes.scoped_nodes import ClassDef, FunctionDef
astroid.nodes.nodes_classes.py
:
from astroid.bases import Instance, _infer_stmts
astroid.nodes.scoped_nodes .py
:
from astroid.bases import BoundMethod, _infer_stmts, Instance
To be totally honest I'm under the impression that the import by full namespace (from astroid import bases
) permitted to hide the circular dependencies under the lazy import rug for a long time, and the current situation is a mess that I despair of being able to fix.