diff options
author | Ben Woosley <ben.woosley@gmail.com> | 2019-02-01 17:00:02 -0800 |
---|---|---|
committer | Ben Woosley <ben.woosley@gmail.com> | 2019-09-03 14:38:38 -0400 |
commit | b21680baf5391a602b295b9d7d0ef66553661cb9 (patch) | |
tree | 014dde0638aa584215f4855341606de65ed1fb89 /contrib/linearize/linearize-hashes.py | |
parent | 6e431296daceee604f48e9e3e87fa84cfd44bef2 (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 'contrib/linearize/linearize-hashes.py')
-rwxr-xr-x | contrib/linearize/linearize-hashes.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/linearize/linearize-hashes.py b/contrib/linearize/linearize-hashes.py index 8529470e09..02c96d2a75 100755 --- a/contrib/linearize/linearize-hashes.py +++ b/contrib/linearize/linearize-hashes.py @@ -106,12 +106,12 @@ if __name__ == '__main__': f = open(sys.argv[1], encoding="utf8") for line in f: # skip comment lines - m = re.search('^\s*#', line) + m = re.search(r'^\s*#', line) if m: continue # parse key=value lines - m = re.search('^(\w+)\s*=\s*(\S.*)$', line) + m = re.search(r'^(\w+)\s*=\s*(\S.*)$', line) if m is None: continue settings[m.group(1)] = m.group(2) |