bad-format-string / W1302#

Message emitted:

Invalid format string

Description:

Used when a PEP 3101 format string is invalid.

Correct code:

print('{a[0]} + {a[1]}'.format(a=[0, 1]))

Problematic code:

print('{a[0] + a[1]}'.format(a=[0, 1])) # [bad-format-string]

Related links:

Created by the string checker.