pylint-errors

W1307 (invalid-format-index)

:x: Problematic code:

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

:heavy_check_mark: Correct code:

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

Rationale:

Used when a PEP 3101 format string uses a lookup specifier ({a[1]}), but the argument passed for formatting doesn’t contain or doesn’t have that key as an attribute.