diff options
author | James Ennis <james.ennis@codethink.com> | 2018-02-14 13:10:18 +0000 |
---|---|---|
committer | James Ennis <james.ennis@codethink.com> | 2018-03-14 14:10:26 +0000 |
commit | ef0efd7010799e568e9eec4bf57027c547bdc49d (patch) | |
tree | 4264109049d8949641720e371589a41d41eade40 | |
parent | 6eac2eda9d1c3b156a4a0dece55f2469a88f1e9c (diff) | |
download | buildstream-ef0efd7010799e568e9eec4bf57027c547bdc49d.tar.gz |
pylint - dealt with anomalous-backslash-in-string warning
-rw-r--r-- | .pylintrc | 1 | ||||
-rw-r--r-- | buildstream/_frontend/widget.py | 2 | ||||
-rw-r--r-- | buildstream/utils.py | 3 |
3 files changed, 3 insertions, 3 deletions
@@ -112,7 +112,6 @@ disable=##################################### # Messages that report warnings which should be addressed # ########################################################### - anomalous-backslash-in-string, bad-continuation, bare-except, broad-except, diff --git a/buildstream/_frontend/widget.py b/buildstream/_frontend/widget.py index c8c366d99..b427d00fd 100644 --- a/buildstream/_frontend/widget.py +++ b/buildstream/_frontend/widget.py @@ -353,7 +353,7 @@ class LogLine(Widget): logfile_tokens.append(FixedText("%", content_profile, format_profile)) format_string = format_string[2:] continue - m = re.search("^%\{([^\}]+)\}", format_string) + m = re.search(r"^%\{([^\}]+)\}", format_string) if m is not None: variable = m.group(1) format_string = format_string[m.end(0):] diff --git a/buildstream/utils.py b/buildstream/utils.py index ff36a8c1b..bd68522ad 100644 --- a/buildstream/utils.py +++ b/buildstream/utils.py @@ -142,6 +142,7 @@ def list_relative_paths(directory): yield os.path.join(basepath, f) +# pylint: disable=anomalous-backslash-in-string def glob(paths, pattern): """A generator to yield paths which match the glob pattern @@ -998,7 +999,7 @@ def _glob2re(pat): res = '{}[{}]'.format(res, stuff) else: res = res + re.escape(c) - return res + '\Z(?ms)' + return res + r'\Z(?ms)' # _deduplicate() |