Fix invalid backslash characters

* https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior

Signed-off-by: Alfred Wingate <parona@protonmail.com>
This commit is contained in:
Alfred Wingate
2023-11-16 05:10:40 +02:00
parent d48699e5fd
commit c0be0e0b67
9 changed files with 19 additions and 19 deletions

View File

@ -119,11 +119,11 @@ def get_deb_url(name):
content = opened.read()
for link in BeautifulSoup(content, parseOnlyThese=SoupStrainer("a")):
if re.match("[^\s]+\.debian\.tar\.(?:gz|bz2)", link.text):
if re.match(r"[^\s]+\.debian\.tar\.(?:gz|bz2)", link.text):
deb_url = link["href"]
deb_type = "source"
break
if re.match("[^\s]+\.diff\.gz", link.text):
if re.match(r"[^\s]+\.diff\.gz", link.text):
deb_url = link["href"]
deb_type = "diff"
break
@ -157,7 +157,7 @@ def patch_metadata(package, watch_data, diff=False):
for watch_line in watch_data.split("\n"): # there can be multiple lines
watch_line = " ".join(watch_line.split()) # remove extra spaces and \n
version_parse = re.match("version=(\d+?)", watch_line)
version_parse = re.match(r"version=(\d+?)", watch_line)
if version_parse:
version = version_parse.group(1)
continue