Fix python 3.12+ error (#128)
Use raw strings in lint.py to fix a Python error.
diff --git a/tools/lint.py b/tools/lint.py
index 4820439..f67799b 100755
--- a/tools/lint.py
+++ b/tools/lint.py
@@ -91,7 +91,7 @@
printer.Print(outerr)
# Find the number of errors in this file.
- res = re.search('Total errors found: (\d+)', outerr)
+ res = re.search(r'Total errors found: (\d+)', outerr)
if res:
n_errors_str = res.string[res.start(1):res.end(1)]
n_errors = int(n_errors_str)
@@ -192,7 +192,7 @@
return retcode == 0
-CPP_EXT_REGEXP = re.compile('\.(cc|h)$')
+CPP_EXT_REGEXP = re.compile(r'\.(cc|h)$')
def IsLinterInput(filename):
# lint all C++ files.
return CPP_EXT_REGEXP.search(filename) != None