From 4860f523d45df502e2d1005df3db4121c7795fe0 Mon Sep 17 00:00:00 2001 From: Krzysztof Opasiak Date: Thu, 17 May 2018 18:47:16 +0200 Subject: Fix invalid escape sequence warnings Starting with Python 3.6, invalid escape sequences in string literals are now deprecated[1]. This influence also automatic style checkers like pycodestyle which starting with 2.4.0 complains about invalid escape sequences (W605)[2]. Let's fix all those warnings at once by using raw strings where possible and adding additional \ where not. Footnotes: 1 - https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior 2 - https://github.com/PyCQA/pycodestyle/pull/676 Change-Id: I009a366fd8342edfd30890df6fe8e1fca88bf3cc Signed-off-by: Krzysztof Opasiak --- tools/install_venv.py | 2 +- tools/trove-pylint.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/install_venv.py b/tools/install_venv.py index f5331071..eee9e720 100755 --- a/tools/install_venv.py +++ b/tools/install_venv.py @@ -79,7 +79,7 @@ def check_dependencies(): print('Installing virtualenv via easy_install...'), if not (run_command(['which', 'easy_install']) and run_command(['easy_install', 'virtualenv'])): - die('ERROR: virtualenv not found.\n\Trove development' + die('ERROR: virtualenv not found.\nTrove development' ' requires virtualenv, please install it using your' ' favorite package management tool') print('done.') diff --git a/tools/trove-pylint.py b/tools/trove-pylint.py index 785c4bf6..5b91a9bd 100755 --- a/tools/trove-pylint.py +++ b/tools/trove-pylint.py @@ -205,7 +205,8 @@ class LintRunner(object): def __init__(self): self.config = Config() self.idline = re.compile("^[*]* Module .*") - self.detail = re.compile("(\S+):(\d+): \[(\S+)\((\S+)\), (\S+)?] (.*)") + self.detail = re.compile(r"(\S+):(\d+): \[(\S+)\((\S+)\)," + r" (\S+)?] (.*)") def dolint(self, filename): exceptions = set() -- cgit v1.2.1