Skip to content

Commit

Permalink
fix: SyntaxWarning for Escape Characters in String Literals (#4792)
Browse files Browse the repository at this point in the history
  • Loading branch information
ConduciveMocha authored Dec 30, 2024
1 parent 716c5c1 commit 78ab232
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mealie/repos/repository_cookbooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def update(self, match_value: str | int | UUID4, data: SaveCookBook | dict) -> R
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
Expand Down
2 changes: 1 addition & 1 deletion mealie/schema/response/query_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""['"](.*)['"]""")

Expand Down

0 comments on commit 78ab232

Please sign in to comment.