mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-30 15:58:24 +01:00
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:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user