Skip to content

Commit 36d80d1

Browse files
committed
chore: fix SyntaxWarning: invalid escape sequence + for py3.12
Signed-off-by: Rui Chen <[email protected]>
1 parent b5feefe commit 36d80d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/google-java-format-diff.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def main():
7575
lines_by_file = {}
7676

7777
for line in sys.stdin:
78-
match = re.search('^\+\+\+\ (.*?/){%s}(\S*)' % args.p, line)
78+
match = re.search(r'^\+\+\+\ (.*?/){%s}(\S*)' % args.p, line)
7979
if match:
8080
filename = match.group(2)
8181
if filename == None:
@@ -88,7 +88,7 @@ def main():
8888
if not re.match('^%s$' % args.iregex, filename, re.IGNORECASE):
8989
continue
9090

91-
match = re.search('^@@.*\+(\d+)(,(\d+))?', line)
91+
match = re.search(r'^@@.*\+(\d+)(,(\d+))?', line)
9292
if match:
9393
start_line = int(match.group(1))
9494
line_count = 1

0 commit comments

Comments
 (0)