pmb: Use raw strings for regexes (MR 2525)

See https://docs.astral.sh/ruff/rules/unraw-re-pattern
This commit is contained in:
Newbyte 2025-01-10 23:30:32 +01:00 committed by Oliver Smith
parent 077efe3623
commit d6f0c80431
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
2 changed files with 2 additions and 2 deletions

View file

@ -301,7 +301,7 @@ def resize_image(img_size_new: str, img_path: Path) -> None:
img_size = os.path.getsize(img_path)
# Make sure we have at least 1 integer followed by either M or G
pattern = re.compile("^[0-9]+[M|G]$")
pattern = re.compile(r"^[0-9]+[M|G]$")
if not pattern.match(img_size_new):
raise RuntimeError("IMAGE_SIZE must be in [M]iB or [G]iB, e.g. 2048M or 2G")