diff options
author | Jake Hunsaker <jhunsake@redhat.com> | 2018-06-11 14:39:17 -0400 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2018-06-20 16:28:42 +0100 |
commit | d8b6793fd81cf4b7391f038d40616494ff10f624 (patch) | |
tree | 09e7fe12c0e312193b07ffdf746ba3dadbc2aee2 /requirements.txt | |
parent | bba78dd1a0b45896848e36ec375f7dc78bd4eeb3 (diff) | |
download | sos-d8b6793fd81cf4b7391f038d40616494ff10f624.tar.gz |
[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 <jhunsake@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Diffstat (limited to 'requirements.txt')
-rw-r--r-- | requirements.txt | 2 |
1 files changed, 1 insertions, 1 deletions
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 |