diff options
| author | Ben Woosley <[email protected]> | 2019-02-01 17:00:02 -0800 |
|---|---|---|
| committer | Ben Woosley <[email protected]> | 2019-09-03 14:38:38 -0400 |
| commit | b21680baf5391a602b295b9d7d0ef66553661cb9 (patch) | |
| tree | 014dde0638aa584215f4855341606de65ed1fb89 /contrib/devtools/clang-format-diff.py | |
| parent | Merge #16745: wallet: Translate all initErrors in CreateWalletFromFile (diff) | |
| download | discoin-b21680baf5391a602b295b9d7d0ef66553661cb9.tar.xz discoin-b21680baf5391a602b295b9d7d0ef66553661cb9.zip | |
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/devtools/clang-format-diff.py')
| -rwxr-xr-x | contrib/devtools/clang-format-diff.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/devtools/clang-format-diff.py b/contrib/devtools/clang-format-diff.py index f322b3a88..98eee67f4 100755 --- a/contrib/devtools/clang-format-diff.py +++ b/contrib/devtools/clang-format-diff.py @@ -106,7 +106,7 @@ def main(): filename = None lines_by_file = {} for line in sys.stdin: - match = re.search('^\+\+\+\ (.*?/){%s}(\S*)' % args.p, line) + match = re.search(r'^\+\+\+\ (.*?/){%s}(\S*)' % args.p, line) if match: filename = match.group(2) if filename is None: @@ -119,7 +119,7 @@ def main(): if not re.match('^%s$' % args.iregex, filename, re.IGNORECASE): continue - match = re.search('^@@.*\+(\d+)(,(\d+))?', line) + match = re.search(r'^@@.*\+(\d+)(,(\d+))?', line) if match: start_line = int(match.group(1)) line_count = 1 |