mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-03 04:25:24 +02:00
fix: SyntaxWarning for Escape Characters in String Literals (#4792)
This commit is contained in:
parent
716c5c1d87
commit
78ab232516
2 changed files with 2 additions and 2 deletions
|
@ -36,7 +36,7 @@ class RepositoryCookbooks(HouseholdRepositoryGeneric[ReadCookBook, CookBook]):
|
|||
data = SaveCookBook(**data)
|
||||
|
||||
new_slug = slugify(data.name)
|
||||
if not (data.slug and re.match(f"^({new_slug})(-\d+)?$", data.slug)):
|
||||
if not (data.slug and re.match(rf"^({new_slug})(-\d+)?$", data.slug)):
|
||||
data.slug = new_slug
|
||||
|
||||
max_retries = 10
|
||||
|
|
|
@ -16,7 +16,7 @@ class SearchFilter:
|
|||
3. remove special characters from each non-literal search string
|
||||
"""
|
||||
|
||||
punctuation = "!\#$%&()*+,-./:;<=>?@[\\]^_`{|}~" # string.punctuation with ' & " removed
|
||||
punctuation = r"!\#$%&()*+,-./:;<=>?@[\\]^_`{|}~" # string.punctuation with ' & " removed
|
||||
quoted_regex = re.compile(r"""(["'])(?:(?=(\\?))\2.)*?\1""")
|
||||
remove_quotes_regex = re.compile(r"""['"](.*)['"]""")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue