.. _bad-format-string-key:

bad-format-string-key / W1300
=============================

**Message emitted:**

Format string dictionary key should be a string, not %s

**Description:**

*Used when a format string that uses named conversion specifiers is used with a dictionary whose keys are not all strings.*


**Correct code:**

.. literalinclude:: /data/messages/b/bad-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.