.. _preferred-module:

preferred-module / W0407
========================

**Message emitted:**

Prefer importing %r instead of %r

**Description:**

*Used when a module imported has a preferred replacement module.*


**Correct code:**

.. literalinclude:: /data/messages/p/preferred-module/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.