Skip to content

Commit c9bd62a

Browse files
Merge pull request ceph#57896 from mchangir/ptl-tool.py-fix-escape-sequences
ptl-tool.py: replace regular strings with raw string literal for regular expressions Reviewed-by: Patrick Donnelly <[email protected]> Reviewed-by: Rishabh Dave <[email protected]> Reviewed-by: Venky Shankar <[email protected]>
2 parents cc542ce + db13062 commit c9bd62a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/script/ptl-tool.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,9 @@
178178
pass
179179
GITHUB_TOKEN = os.getenv("PTL_TOOL_GITHUB_TOKEN", GITHUB_TOKEN)
180180
INDICATIONS = [
181-
re.compile("(Reviewed-by: .+ <[\[email protected]]+>)", re.IGNORECASE),
182-
re.compile("(Acked-by: .+ <[\[email protected]]+>)", re.IGNORECASE),
183-
re.compile("(Tested-by: .+ <[\[email protected]]+>)", re.IGNORECASE),
181+
re.compile(r"(Reviewed-by: .+ <[\[email protected]]+>)", re.IGNORECASE),
182+
re.compile(r"(Acked-by: .+ <[\[email protected]]+>)", re.IGNORECASE),
183+
re.compile(r"(Tested-by: .+ <[\[email protected]]+>)", re.IGNORECASE),
184184
]
185185
REDMINE_CUSTOM_FIELD_ID_SHAMAN_BUILD = 26
186186
REDMINE_CUSTOM_FIELD_ID_QA_RUNS = 27
@@ -218,8 +218,8 @@
218218
CONTRIBUTORS = {}
219219
NEW_CONTRIBUTORS = {}
220220
with codecs.open(git_dir + "/.githubmap", encoding='utf-8') as f:
221-
comment = re.compile("\s*#")
222-
patt = re.compile("([\w-]+)\s+(.*)")
221+
comment = re.compile(r"\s*#")
222+
patt = re.compile(r"([\w-]+)\s+(.*)")
223223
for line in f:
224224
if comment.match(line):
225225
continue

0 commit comments

Comments
 (0)