anomalous-backslash-in-string / W1401#

Message emitted:

Anomalous backslash in string: '%s'. String constant might be missing an r prefix.

Description:

Used when a backslash is in a literal string but not as an escape.

Problematic code:

string = "\z"  # [anomalous-backslash-in-string]

Correct code:

string = r"\z"
string = "\n"

Created by the string checker.