mirror of
https://github.com/google/nomulus
synced 2026-01-06 21:47:31 +00:00
Update google-java-format (#2570)
Also converted regex strings in the Python script to raw strings as future Python versions will start to reject them. See: https://docs.python.org/3/whatsnew/3.12.html#other-language-changes
This commit is contained in:
@@ -63,7 +63,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 is None:
|
||||
@@ -76,7 +76,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
|
||||
|
||||
Reference in New Issue
Block a user