forked from DRMTalks/devine
Remove unused f-strings with no placeholders
This commit is contained in:
parent
d982e37ee5
commit
268509fb49
|
@ -183,7 +183,7 @@ class dl:
|
||||||
|
|
||||||
if proxy:
|
if proxy:
|
||||||
requested_provider = None
|
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
|
# requesting proxy from a specific proxy provider
|
||||||
requested_provider, proxy = proxy.split(":", maxsplit=1)
|
requested_provider, proxy = proxy.split(":", maxsplit=1)
|
||||||
if re.match(r"^[a-z]{2}(?:\d+)?$", proxy, re.IGNORECASE):
|
if re.match(r"^[a-z]{2}(?:\d+)?$", proxy, re.IGNORECASE):
|
||||||
|
|
|
@ -74,7 +74,7 @@ def sanitize_filename(filename: str, spacer: str = ".") -> str:
|
||||||
filename = filename.\
|
filename = filename.\
|
||||||
replace("/", " & ").\
|
replace("/", " & ").\
|
||||||
replace(";", " & ") # e.g. multi-episode filenames
|
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(r"[\\*!?¿,'\"()<>|$#]", "", filename) # not filename safe chars
|
||||||
filename = re.sub(rf"[{spacer}]{{2,}}", spacer, filename) # remove extra neighbouring (spacer)s
|
filename = re.sub(rf"[{spacer}]{{2,}}", spacer, filename) # remove extra neighbouring (spacer)s
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue