Cosmetics, replace safe filename regex with triple-quoted string so we don't have to bḁash-escape literal double quote

This commit is contained in:
hygienic-books 2022-03-19 01:53:39 +01:00
parent c5f74ce479
commit 7b391be89e

View File

@ -359,7 +359,7 @@ def get_safe_filename(
dirty_filename: str) -> str:
"""https://stackoverflow.com/a/71199182"""
clean_filename = re.sub(r"[/\\?%*:|\"<>\x7F\x00-\x1F]", "-", dirty_filename)
clean_filename = re.sub(r"""[/\\?%*:|"<>\x7F\x00-\x1F]""", "-", dirty_filename)
return clean_filename