pylint-dev / astroid

A common base representation of python source code for pylint and other projects
https://pylint.readthedocs.io/projects/astroid/en/latest/
GNU Lesser General Public License v2.1
533 stars 276 forks source link

Consider making astroid.node.* private #1132

Open AWhetter opened 3 years ago

AWhetter commented 3 years ago

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.

Pierre-Sassoulas commented 3 years ago

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 ?