From a3b706a774f3839c00b3bbc6e315c197ff99a561 Mon Sep 17 00:00:00 2001 From: Nate Johnston Date: Tue, 5 Mar 2019 15:35:12 -0500 Subject: [PATCH] Fix pep8 errors in os-ken Update the lower constraint for appdirs, similarly to how it has been done in other repos. Whitelist pep8 error E113. This is the "unexpected indent" error. This module uses C-style comment blocks pervasively, things like: OFPP_IN_PORT = 0xfff8 # Send the packet out the input port. This # virtual port must be explicitly used # in order to send back out of the input # port. OFPP_TABLE = 0xfff9 # Perform actions in flow table. # NB: This can only be the destination # port for packet-out messages. OFPP_NORMAL = 0xfffa # Process with normal L2/L3 switching. For the lines above the ones that have an indented comment with no code to the left would get E113 with a recent change to a less permissive policy. It would cause over 260 changes to comment strings, destroying the consistency of comment style, to make that change. Therefore, blacklist that pycodestyle error. Change-Id: I6d2f463b50551f32bce863aa7dc0c70ad3054cbd Story: #2005142 --- lower-constraints.txt | 2 +- tox.ini | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lower-constraints.txt b/lower-constraints.txt index 77a10d33..4b4b5e4b 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -1,7 +1,7 @@ alabaster==0.7.10 alembic==0.8.10 amqp==2.1.1 -appdirs==1.3.0 +appdirs==1.4.3 astroid==1.6.5 Babel==2.3.4 bandit==1.1.0 diff --git a/tox.ini b/tox.ini index 752e7312..6632e0f0 100644 --- a/tox.ini +++ b/tox.ini @@ -56,6 +56,7 @@ commands = oslo_debug_helper {posargs} [flake8] show-source = True +# E113: unexpected whitespace; skipped in os-ken because C-style comment blocks are used pervasively # E123, E125 skipped as they are invalid PEP-8. # Temporarily ignoring these warnings # W503: line break before binary operator @@ -85,7 +86,7 @@ show-source = True # H404: Multi line docstrings should start without a leading new line. # H405: Multi line docstrings should start with a one line summary followed by an empty line. # H501: Do not use ``locals()`` or ``self.__dict__`` for formatting strings -ignore = E123,E125,W503,E116,E128,E402,E501,E704,E722,E731,E741,F401,F403,F811,F812,F821,F841,H101,H102,H104,H105,H201,H301,H306,H401,H403,H404,H405,H501 +ignore = E113,E123,E125,W503,E116,E128,E402,E501,E704,E722,E731,E741,F401,F403,F811,F812,F821,F841,H101,H102,H104,H105,H201,H301,H306,H401,H403,H404,H405,H501 builtins = _ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,os_ken/contrib