.. _missing-format-argument-key:

missing-format-argument-key / W1303
===================================

**Message emitted:**

Missing keyword argument %r for format string

**Description:**

*Used when a PEP 3101 format string that uses named fields doesn't receive one or more required keywords.*

**Problematic code:**

.. literalinclude:: /data/messages/m/missing-format-argument-key/bad.py
   :language: python

**Correct code:**

.. literalinclude:: /data/messages/m/missing-format-argument-key/good.py
   :language: python


**Related links:**

- `PEP 3101 <https://peps.python.org/pep-3101/>`_
- `Custom String Formmating <https://docs.python.org/3/library/string.html#custom-string-formatting>`_

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