From b21680baf5391a602b295b9d7d0ef66553661cb9 Mon Sep 17 00:00:00 2001 From: Ben Woosley Date: Fri, 1 Feb 2019 17:00:02 -0800 Subject: 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. --- test/lint/lint-format-strings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/lint/lint-format-strings.py') 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() -- cgit v1.2.3