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.
This commit is contained in:
parent
6e431296da
commit
b21680baf5
14 changed files with 38 additions and 41 deletions
test/lint
|
@ -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()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue