From 7bcce256af2b5e6ead446eaf042514d2df324662 Mon Sep 17 00:00:00 2001 From: Benjamin A. Beasley Date: Jul 29 2024 12:56:06 +0000 Subject: Fix invalid escape sequence SyntaxWarning from regex pattern --- diff --git a/spectool b/spectool index 4c6069b..e8e03fc 100755 --- a/spectool +++ b/spectool @@ -98,7 +98,7 @@ class Spec(object): """Object to encapsulate a spec file and provide the info we want.""" interesting_tags = ['source(?P[0-9]*)', 'patch(?P[0-9]*)', 'name', 'version', 'release'] # Join all of those tags together in a big regex - tag_re = re.compile("^(?P" + "|".join(interesting_tags) + "):\s*(?P.*)\s*$", re.IGNORECASE) + tag_re = re.compile("^(?P" + "|".join(interesting_tags) + r"):\s*(?P.*)\s*$", re.IGNORECASE) def __init__(self, spec): self.spec = spec