Skip to content

Commit

Permalink
chore: fix SyntaxWarning: invalid escape sequence + for py3.12
Browse files Browse the repository at this point in the history
Signed-off-by: Rui Chen <[email protected]>
  • Loading branch information
chenrui333 committed Dec 19, 2023
1 parent b5feefe commit 36d80d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/google-java-format-diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def main():
lines_by_file = {}

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

match = re.search('^@@.*\+(\d+)(,(\d+))?', line)
match = re.search(r'^@@.*\+(\d+)(,(\d+))?', line)
if match:
start_line = int(match.group(1))
line_count = 1
Expand Down

0 comments on commit 36d80d1

Please sign in to comment.