]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ptl-tool.py: replace regex strings with raw string literal 57896/head
authorMilind Changire <mchangir@redhat.com>
Wed, 5 Jun 2024 15:36:08 +0000 (21:06 +0530)
committerMilind Changire <mchangir@redhat.com>
Fri, 30 Aug 2024 07:59:37 +0000 (13:29 +0530)
Signed-off-by: Milind Changire <mchangir@redhat.com>
src/script/ptl-tool.py

index 58b9b20f77b8913a4318df81db5131e1ffdb70f1..b1373738429419e1ab947c5dd93034e3158d13d7 100755 (executable)
@@ -178,9 +178,9 @@ except FileNotFoundError:
     pass
 GITHUB_TOKEN = os.getenv("PTL_TOOL_GITHUB_TOKEN", GITHUB_TOKEN)
 INDICATIONS = [
-    re.compile("(Reviewed-by: .+ <[\w@.-]+>)", re.IGNORECASE),
-    re.compile("(Acked-by: .+ <[\w@.-]+>)", re.IGNORECASE),
-    re.compile("(Tested-by: .+ <[\w@.-]+>)", re.IGNORECASE),
+    re.compile(r"(Reviewed-by: .+ <[\w@.-]+>)", re.IGNORECASE),
+    re.compile(r"(Acked-by: .+ <[\w@.-]+>)", re.IGNORECASE),
+    re.compile(r"(Tested-by: .+ <[\w@.-]+>)", re.IGNORECASE),
 ]
 REDMINE_CUSTOM_FIELD_ID_SHAMAN_BUILD = 26
 REDMINE_CUSTOM_FIELD_ID_QA_RUNS = 27
@@ -218,8 +218,8 @@ while not os.path.exists(git_dir + '/.git'):
 CONTRIBUTORS = {}
 NEW_CONTRIBUTORS = {}
 with codecs.open(git_dir + "/.githubmap", encoding='utf-8') as f:
-    comment = re.compile("\s*#")
-    patt = re.compile("([\w-]+)\s+(.*)")
+    comment = re.compile(r"\s*#")
+    patt = re.compile(r"([\w-]+)\s+(.*)")
     for line in f:
         if comment.match(line):
             continue