.. _import-private-name: import-private-name / C2701 =========================== **Message emitted:** ``Imported private %s (%s)`` **Description:** *Used when a private module or object prefixed with _ is imported. PEP8 guidance on Naming Conventions states that public attributes with leading underscores should be considered private.* **Problematic code:** .. literalinclude:: /data/messages/i/import-private-name/bad.py :language: python **Correct code:** .. literalinclude:: /data/messages/i/import-private-name/good.py :language: python **Configuration file:** .. literalinclude:: /data/messages/i/import-private-name/pylintrc :language: ini **Additional details:** Using private imports expose you to unexpected breaking changes for any version bump of your dependencies, even in patch versions. .. note:: This message is emitted by the optional :ref:`'import-private-name'` checker, which requires the ``pylint.extensions.private_import`` plugin to be loaded. Created by the `import-private-name `__ checker.