Remove unused f-strings with no placeholders

This commit is contained in:
rlaphoenix 2023-02-10 19:26:46 +00:00
parent d982e37ee5
commit 268509fb49
2 changed files with 2 additions and 2 deletions

View File

@ -183,7 +183,7 @@ class dl:
if proxy:
requested_provider = None
if re.match(rf"^[a-z]+:.+$", proxy, re.IGNORECASE):
if re.match(r"^[a-z]+:.+$", proxy, re.IGNORECASE):
# requesting proxy from a specific proxy provider
requested_provider, proxy = proxy.split(":", maxsplit=1)
if re.match(r"^[a-z]{2}(?:\d+)?$", proxy, re.IGNORECASE):

View File

@ -74,7 +74,7 @@ def sanitize_filename(filename: str, spacer: str = ".") -> str:
filename = filename.\
replace("/", " & ").\
replace(";", " & ") # e.g. multi-episode filenames
filename = re.sub(rf"[:; ]", spacer, filename) # structural chars to (spacer)
filename = re.sub(r"[:; ]", spacer, filename) # structural chars to (spacer)
filename = re.sub(r"[\\*!?¿,'\"()<>|$#]", "", filename) # not filename safe chars
filename = re.sub(rf"[{spacer}]{{2,}}", spacer, filename) # remove extra neighbouring (spacer)s