Skip to content

Commit f7fc46d

Browse files
[SYCL][E2E] Use "raw string" in re.search(r"", ...) (#16807)
We've been getting ``` .../sycl/test-e2e/format.py:34: SyntaxWarning: invalid escape sequence '\.' win = re.search("win: *([0-9]{3}\.[0-9]{4})", line) ``` before this PR.
1 parent 32abcd1 commit f7fc46d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sycl/test-e2e/format.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ def parse_min_intel_driver_req(line_number, line, output):
2525
if not output:
2626
output = {}
2727

28-
lin = re.search("lin: *([0-9]{5})", line)
28+
lin = re.search(r"lin: *([0-9]{5})", line)
2929
if lin:
3030
if "lin" in output:
3131
raise ValueError('Multiple entries for "lin" version')
3232
output["lin"] = int(lin.group(1))
3333

34-
win = re.search("win: *([0-9]{3}\.[0-9]{4})", line)
34+
win = re.search(r"win: *([0-9]{3}\.[0-9]{4})", line)
3535
if win:
3636
if "win" in output:
3737
raise ValueError('Multiple entries for "win" version')

0 commit comments

Comments
 (0)