astroid icon indicating copy to clipboard operation
astroid copied to clipboard

Consider making astroid.node.* private

Open AWhetter opened this issue 4 years ago • 1 comments

If we're taking the time and effort to move the astroid.node_classes and astroid.scoped_nodes modules under astroid.nodes, should we consider making these submodules private? I don't think that this separation really helps users and I've always found it annoying (both as a user and as a maintainer) more than I've found it useful for organisation. It would also give us the flexibility to move classes around so that we can address the cyclic imports that prevent us from being able to declare __all__ and do wildcard imports at the moment.

AWhetter avatar Aug 16 '21 17:08 AWhetter

The thing I had in mind was to make astroid.nodes (or astroid) the entrypoint to import everything and to make node_classes and scoped_nodes private. What your suggesting is to use only astroid and not astroid.nodes ?

Pierre-Sassoulas avatar Aug 16 '21 17:08 Pierre-Sassoulas