Skip to content

Commit a2674c0

Browse files
dprankeDevtools-frontend LUCI CQ
authored andcommitted
Fix Python SyntaxWarning in //scripts/build/wasm-as.py.
In Python 3.12, unrecognized escape character sequences in a string produce a "SyntaxWarning" log message when the file is parsed. The fix is (usually) to change the string from a regular string to a raw string, by putting an "r" in front of the leading quote. Bug: 376746798 Change-Id: Ie888a8de6ae42c4daae6fa5028134722634d70c1 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5981155 Commit-Queue: Dirk Pranke <[email protected]> Reviewed-by: Michael Achenbach <[email protected]> Reviewed-by: Liviu Rau <[email protected]>
1 parent 695dba0 commit a2674c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/build/wasm-as.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def script_main(args):
5454
options.output
5555
])
5656
(size, offset) = re.search(
57-
b'Section {[^}]*Type: CODE[^}]*Size: (\d*)[^}]*Offset: (\d*)[^}]*}',
57+
rb'Section {[^}]*Type: CODE[^}]*Size: (\d*)[^}]*Offset: (\d*)[^}]*}',
5858
wasm_obj_headers).groups()
5959

6060
# readobj reports as offset the location of the first byte of the header.

0 commit comments

Comments
 (0)