.. _wrong-import-position:

wrong-import-position / C0413
=============================

**Message emitted:**

Import "%s" should be placed at the top of the module

**Description:**

*Used when code and imports are mixed.*

**Problematic code:**

.. literalinclude:: /data/messages/w/wrong-import-position/bad.py
   :language: python

**Correct code:**

.. literalinclude:: /data/messages/w/wrong-import-position/good.py
   :language: python



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