.. _unused-format-string-key:

unused-format-string-key / W1301
================================

**Message emitted:**

``Unused key %r in format string dictionary``

**Description:**

*Used when a format string that uses named conversion specifiers is used with a dictionary that contains keys not required by the format string.*

**Problematic code:**

.. literalinclude:: /data/messages/u/unused-format-string-key/bad.py
   :language: python

**Correct code:**

.. literalinclude:: /data/messages/u/unused-format-string-key/good.py
   :language: python





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