logger.debug("string='%s' - #1", string)
# No port number
- string = re.sub("\:\d+$", "", string)
+ string = re.sub(r"\:\d+$", "", string)
logger.debug("string='%s' - #2", string)
# No protocol, sometimes without the slashes
- string = re.sub("^https?\:(\/*)", "", string)
+ string = re.sub(r"^https?\:(\/*)", "", string)
logger.debug("string='%s' - #3", string)
# No trailing slash
- string = re.sub("\/$", "", string)
+ string = re.sub(r"\/$", "", string)
logger.debug("string='%s' - #4", string)
# No @ or : sign
- string = re.sub("^\@", "", string)
+ string = re.sub(r"^\@", "", string)
string = string.split(":")[0]
logger.debug("string='%s' - #5", string)
# No individual users in block lists
- string = re.sub("(.+)\@", "", string)
+ string = re.sub(r"(.+)\@", "", string)
logger.debug("string='%s' - #6", string)
if string.find("/profile/"):
# Pattern instance for version numbers
patterns = [
# semantic version number (with v|V) prefix)
- re.compile("^(?P<version>v|V{0,1})(\.{0,1})(?P<major>0|[1-9]\d*)\.(?P<minor>0+|[1-9]\d*)(\.(?P<patch>0+|[1-9]\d*)(?:-(?P<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?P<buildmetadata>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)?$"),
+ re.compile(r"^(?P<version>v|V{0,1})(\.{0,1})(?P<major>0|[1-9]\d*)\.(?P<minor>0+|[1-9]\d*)(\.(?P<patch>0+|[1-9]\d*)(?:-(?P<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?P<buildmetadata>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)?$"),
# non-sematic, e.g. 1.2.3.4
- re.compile("^(?P<version>v|V{0,1})(\.{0,1})(?P<major>0|[1-9]\d*)\.(?P<minor>0+|[1-9]\d*)(\.(?P<patch>0+|[1-9]\d*)(\.(?P<subpatch>0|[1-9]\d*))?)$"),
+ re.compile(r"^(?P<version>v|V{0,1})(\.{0,1})(?P<major>0|[1-9]\d*)\.(?P<minor>0+|[1-9]\d*)(\.(?P<patch>0+|[1-9]\d*)(\.(?P<subpatch>0|[1-9]\d*))?)$"),
# non-sematic, e.g. 2023-05[-dev]
- re.compile("^(?P<year>[1-9]{1}[0-9]{3})\.(?P<month>[0-9]{2})(-dev){0,1}$"),
+ re.compile(r"^(?P<year>[1-9]{1}[0-9]{3})\.(?P<month>[0-9]{2})(-dev){0,1}$"),
# non-semantic, e.g. abcdef0
re.compile("^[a-f0-9]{7}$"),
]
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use "--disable=all --enable=classes
# --disable=W".
-disable=anomalous-backslash-in-string,duplicate-code,no-else-raise
+disable=
# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option