bad-string-format-type / E1307#

Message emitted:

Argument %r does not match format type %r

Description:

Used when a type required by format string is not suitable for actual argument type

Correct code:

print("%d" % 1)

Problematic code:

print("%d" % "1")  # [bad-string-format-type]

Additional details:

This check is currently only active for "old-style" string formatting as seen in the examples. See Issue #6085 for more information.

Related links:

Created by the string checker.