format-needs-mapping / E1303#

Message emitted:

Expected mapping for format string, not %s

Description:

Used when a format string that uses named conversion specifiers is used with an argument that is not a mapping.

Correct code:

print("%(x)d %(y)d" % {"x": 1, "y": 2})

Problematic code:

print("%(x)d %(y)d" % [1, 2])  # [format-needs-mapping]

Created by the string checker.