.. _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.*


**Correct code:**

.. literalinclude:: /data/messages/u/unused-format-string-key/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 `string <https://github.com/PyCQA/pylint/blob/main/pylint/checkers/strings.py>`__ checker.