summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorKrzysztof Opasiak <k.opasiak@samsung.com>2018-05-17 18:47:16 +0200
committerKrzysztof Opasiak <k.opasiak@samsung.com>2018-07-02 21:16:41 +0200
commit4860f523d45df502e2d1005df3db4121c7795fe0 (patch)
treeb75a94c4815482894535bf16c16e4507d7ef9753 /tools
parentf51e726f643b65ee816dff66cc9a3c932c0bca23 (diff)
downloadtrove-4860f523d45df502e2d1005df3db4121c7795fe0.tar.gz
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 <k.opasiak@samsung.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/install_venv.py2
-rwxr-xr-xtools/trove-pylint.py3
2 files changed, 3 insertions, 2 deletions
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()