diff options
author | David Robillard <d@drobilla.net> | 2020-07-04 13:27:09 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-07-04 13:27:09 +0200 |
commit | e0480cd0ce4648e7972410ad0a736fd39a1ee9e4 (patch) | |
tree | 94629509b4641e5fa0f9243dab7d7d43cfc12ed2 /extras/autowaf.py | |
parent | 847eeeb4e76d807afe92a32b0ffbf7f960161d59 (diff) | |
download | autowaf-e0480cd0ce4648e7972410ad0a736fd39a1ee9e4.tar.gz autowaf-e0480cd0ce4648e7972410ad0a736fd39a1ee9e4.tar.bz2 autowaf-e0480cd0ce4648e7972410ad0a736fd39a1ee9e4.zip |
Use raw strings for regular expressions
Fixes flake8 warning W605.
Diffstat (limited to 'extras/autowaf.py')
-rw-r--r-- | extras/autowaf.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/extras/autowaf.py b/extras/autowaf.py index 4a8dd32..8a834bb 100644 --- a/extras/autowaf.py +++ b/extras/autowaf.py @@ -202,7 +202,7 @@ def check_pkg(conf, spec, **kwargs): return import re - match = re.match('([^ ]*) >= [0-9\.]*', spec) + match = re.match(r'([^ ]*) >= [0-9\.]*', spec) args = [] if match: name = match.group(1) @@ -1130,9 +1130,9 @@ class TestContext(Build.BuildContext): stderr=subprocess.STDOUT).decode('ascii') import re - lines = re.search('lines\.*: (.*)%.*', summary).group(1) - functions = re.search('functions\.*: (.*)%.*', summary).group(1) - branches = re.search('branches\.*: (.*)%.*', summary).group(1) + lines = re.search(r'lines\.*: (.*)%.*', summary).group(1) + functions = re.search(r'functions\.*: (.*)%.*', summary).group(1) + branches = re.search(r'branches\.*: (.*)%.*', summary).group(1) self.log_good( 'COVERAGE', '%s%% lines, %s%% functions, %s%% branches', lines, functions, branches) |