From d8b6793fd81cf4b7391f038d40616494ff10f624 Mon Sep 17 00:00:00 2001 From: Jake Hunsaker Date: Mon, 11 Jun 2018 14:39:17 -0400 Subject: [global] Transition to pycodestyle The 'pep8' tool has been renamed to 'pycodestyle' to avoid confusion with pep8 the document. pep8 (the tool) will no longer be updated and as such we should transition to the new pycodestyle. This commit fixes a number of PEP8 issues with the new pycodestyle linter that has tests for new additions to PEP8 that the pep8 tool did not include. Most of these are exception handling fixes like: sos/plugins/logs.py:96:13: E722 do not use bare 'except' Which are relatively straight forward to address, by instead catching just the applicable exceptions, e.g. IOError, ValueError, etc... In cases where there were many possible exceptions or where the "bare 'except'" was a final catch-all, we now use 'except Exception' to catch anything from the base exception class. Another frequent correction was for escape sequencing, such as: sos/plugins/logs.py:48:15: W605 invalid escape sequence '\S' The solution for this is to mark these regex strings as raw strings, which is preferred by `re` as future releases of that module may/will become more strict in its parsing of regex strings. Resolves: #1344 Signed-off-by: Jake Hunsaker Signed-off-by: Bryn M. Reeves --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'requirements.txt') diff --git a/requirements.txt b/requirements.txt index 6888f3fd..236189eb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -pep8>=1.7.0 +pycodestyle>=2.4.0 nose>=1.3.7 coverage>=4.0.3 Sphinx>=1.3.5 -- cgit