.. _relative-beyond-top-level:

relative-beyond-top-level / E0402
=================================

**Message emitted:**

Attempted relative import beyond top-level package

**Description:**

*Used when a relative import tries to access too many levels in the current package.*


**Correct code:**

.. literalinclude:: /data/messages/r/relative-beyond-top-level/good.py
   :language: python

**Additional details:**

You can help us make the doc better `by contributing <https://github.com/PyCQA/pylint/issues/5953>`_ !


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