Python

Python

Made by DeepSource

Anomalous backslash detected PY-W0073

Bug risk
Major
Autofix

Backslash is present in the literal string but is not a valid escape sequence. If it is intended to be an escape sequence, use the correct escape characters. If it is intended to be a literal backslash, it can either be replaced with with an escaped backslash \\, or you can add an r prefix to make it a "raw" string.

Bad practice

filepath =  "C:\myfiles\run.py"

Recommended

filepath =  "C:\\myfiles\\run.py"  # use `\\` to render one backslash
filepath =  r"C:\myfiles\run.py"  # use the `r` prefix to avoid unnecessary escapes