.. _format-combined-specification:

format-combined-specification / W1305
=====================================

**Message emitted:**

Format string contains both automatic field numbering and manual field specification

**Description:**

*Used when a PEP 3101 format string contains both automatic field numbering (e.g. '{}') and manual field specification (e.g. '{0}').*

**Problematic code:**

.. literalinclude:: /data/messages/f/format-combined-specification/bad.py
   :language: python

**Correct code:**

.. literalinclude:: /data/messages/f/format-combined-specification/good.py
   :language: python



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