.. _import-self:

import-self / W0406
===================

**Message emitted:**

Module import itself

**Description:**

*Used when a module is importing itself.*

**Problematic code:**

.. literalinclude:: /data/messages/i/import-self/bad.py
   :language: python

**Correct code:**

.. literalinclude:: /data/messages/i/import-self/good.py
   :language: python



Created by the `imports <https://github.com/PyCQA/pylint/blob/main/pylint/checkers/imports.py>`__ checker.