Use raw strings for all regular expressions.
This fixes warnings from pylint 0.27.
BUG=None
TEST=cros lint complains less about these files.
TEST=run_tests passes.
TEST=remote trybot passes.
Change-Id: Ie7e6d3cb6139e7dff81dcd0bb1a1ecc61c2df763
Reviewed-on: https://gerrit.chromium.org/gerrit/45623
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: David James <davidjames@chromium.org>
Commit-Queue: David James <davidjames@chromium.org>
diff --git a/scripts/cros_merge_to_branch.py b/scripts/cros_merge_to_branch.py
index f15b142..c951191 100644
--- a/scripts/cros_merge_to_branch.py
+++ b/scripts/cros_merge_to_branch.py
@@ -111,7 +111,7 @@
line.startswith('Tested-by: '):
# If the tag is malformed, or the person lacks a name,
# then that's just too bad -- throw it away.
- ele = re.split('[<>@]+', line)
+ ele = re.split(r'[<>@]+', line)
if len(ele) == 4:
reviewers.add('@'.join(ele[-3:-1]))
continue
@@ -136,7 +136,7 @@
carbon_copy=False, dryrun=dryrun, reviewers=reviewers)
except cros_build_lib.RunCommandError as e:
if (e.result.returncode == 128 and
- re.search('fatal: user ".*?" not found', e.result.error)):
+ re.search(r'fatal: user ".*?" not found', e.result.error)):
logging.warning('Some reviewers were not found (%s); '
'dropping them & retrying upload', ' '.join(reviewers))
continue