Skip to content

Commit 0ba5878

Browse files
committed
fix(polly/**.py): fix invalid escape sequences
1 parent b4f3a96 commit 0ba5878

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

polly/test/update_check.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,12 @@ def classyfier2(lines):
222222
line = i.__next__()
223223

224224

225-
replrepl = {"{{": "{{[{][{]}}", "}}": "{{[}][}]}}", "[[": "{{\[\[}}", "]]": "{{\]\]}}"}
225+
replrepl = {
226+
"{{": "{{[{][{]}}",
227+
"}}": "{{[}][}]}}",
228+
"[[": r"{{\[\[}}",
229+
"]]": r"{{\]\]}}",
230+
}
226231
replre = re.compile("|".join(re.escape(k) for k in replrepl.keys()))
227232

228233

@@ -452,7 +457,7 @@ def main():
452457
checkre = re.compile(
453458
r"^\s*\;\s*("
454459
+ "|".join([re.escape(s) for s in checkprefixes])
455-
+ ")(\-NEXT|\-DAG|\-NOT|\-LABEL|\-SAME)?\s*\:"
460+
+ r")(\-NEXT|\-DAG|\-NOT|\-LABEL|\-SAME)?\s*\:"
456461
)
457462
firstcheckline = None
458463
firstnoncommentline = None

0 commit comments

Comments
 (0)