.. _mixed-format-string:

mixed-format-string / E1302
===========================

**Message emitted:**

Mixing named and unnamed conversion specifiers in format string

**Description:**

*Used when a format string contains both named (e.g. '%(foo)d') and unnamed (e.g. '%d') conversion specifiers.  This is also used when a named conversion specifier contains * for the minimum field width and/or precision.*

**Problematic code:**

.. literalinclude:: /data/messages/m/mixed-format-string/bad.py
   :language: python

**Correct code:**

.. literalinclude:: /data/messages/m/mixed-format-string/good.py
   :language: python



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