aboutsummaryrefslogtreecommitdiff
path: root/test/lint/lint-format-strings.py
diff options
context:
space:
mode:
authorBen Woosley <ben.woosley@gmail.com>2019-02-01 17:00:02 -0800
committerBen Woosley <ben.woosley@gmail.com>2019-09-03 14:38:38 -0400
commitb21680baf5391a602b295b9d7d0ef66553661cb9 (patch)
tree014dde0638aa584215f4855341606de65ed1fb89 /test/lint/lint-format-strings.py
parent6e431296daceee604f48e9e3e87fa84cfd44bef2 (diff)
test/contrib: Fix invalid escapes in regex strings
Flagged by flake8 v3.6.0, as W605, plus a few others identified incidentally, e.g. 59ffecf66cf4d08c4b431e457b083878d66a3fd6. Note that r"\n" matches to "\n" under re.match/search.
Diffstat (limited to 'test/lint/lint-format-strings.py')
-rwxr-xr-xtest/lint/lint-format-strings.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/lint/lint-format-strings.py b/test/lint/lint-format-strings.py
index 47ad896589..9f34d0f4dd 100755
--- a/test/lint/lint-format-strings.py
+++ b/test/lint/lint-format-strings.py
@@ -55,7 +55,7 @@ def normalize(s):
assert type(s) is str
s = s.replace("\n", " ")
s = s.replace("\t", " ")
- s = re.sub("/\*.*?\*/", " ", s)
+ s = re.sub(r"/\*.*?\*/", " ", s)
s = re.sub(" {2,}", " ", s)
return s.strip()