Anomalous backslash in string: '\w'. String constant might be missing an r prefix.
42def latest(repo, output_format='version', pre_ok=False, assets_filter=None,
43 short_urls=False, major=None, only=None, at=None,
44 having_asset=None, exclude=None, even=False):
45 """Find the latest release version for a project. 46
47 Args:
48 major (str): Only consider versions which are "descendants" of this major version string
Description
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