.. _format-needs-mapping:

format-needs-mapping / E1303
============================

**Message emitted:**

Expected mapping for format string, not %s

**Description:**

*Used when a format string that uses named conversion specifiers is used with an argument that is not a mapping.*

**Problematic code:**

.. literalinclude:: /data/messages/f/format-needs-mapping/bad.py
   :language: python

**Correct code:**

.. literalinclude:: /data/messages/f/format-needs-mapping/good.py
   :language: python



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