diff mbox

[1/3] tox: Remove ignored PEP8 errors and directories

Message ID 1449779268-8119-1-git-send-email-stephen.finucane@intel.com
State Accepted
Headers show

Commit Message

Stephen Finucane Dec. 10, 2015, 8:27 p.m. UTC
Remove the following 'ignore' errors:

  E121-128,131  various visual indentation errors
  E251          spaces around keyword / parameter equals
  H405          multi-line docstring must have summary line

The only error remaining is E129, which is technically not part of the
PEP8 standard and contributes in practice besides lots of manual line
wrapping.

In addition, there's no good reason why the tests directory shouldn't
be assessed like everything else - tests are still code and, as such,
should be held to the same standards..

Finally, include the 'pwclient' script which should not be ignored.

Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
---
 tox.ini | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Stephen Finucane Dec. 10, 2015, 8:37 p.m. UTC | #1
On 10 Dec 20:27, Stephen Finucane wrote:
> ...using the 'autopep8' tool.
> 
> Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>

To anyone concerned about the impact this will have on existing
patches: I'm more than happy to do the rebase (I'll probably checkout
pre-PEP8, merge patch and 'autopep8' again). Just FYI. This annoys me
and is enough to fix that I think it's worth the effort.

Stephen
Stephen Finucane Dec. 10, 2015, 8:44 p.m. UTC | #2
On 10 Dec 20:37, Finucane, Stephen wrote:
> On 10 Dec 20:27, Stephen Finucane wrote:
> > ...using the 'autopep8' tool.
> > 
> > Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
> 
> To anyone concerned about the impact this will have on existing
> patches: I'm more than happy to do the rebase (I'll probably checkout
> pre-PEP8, merge patch and 'autopep8' again). Just FYI. This annoys me
> and is enough to fix that I think it's worth the effort.
> 
> Stephen

...and mailman is dropping patches again. The other patches are mostly
autogenerated and can be found here:

https://github.com/stephenfin/patchwork/tree/feat/pep8

Feel free to reply to this mail with any concerns.

Stephen
Stephen Finucane Dec. 21, 2015, 2:50 p.m. UTC | #3
On 10 Dec 20:27, Stephen Finucane wrote:
> Remove the following 'ignore' errors:
> 
>   E121-128,131  various visual indentation errors
>   E251          spaces around keyword / parameter equals
>   H405          multi-line docstring must have summary line
> 
> The only error remaining is E129, which is technically not part of the
> PEP8 standard and contributes in practice besides lots of manual line
> wrapping.
> 
> In addition, there's no good reason why the tests directory shouldn't
> be assessed like everything else - tests are still code and, as such,
> should be held to the same standards..
> 
> Finally, include the 'pwclient' script which should not be ignored.
> 
> Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>

A non-code change that brings around some useful code quality
improvements. Merged.
Stephen Finucane Dec. 21, 2015, 2:51 p.m. UTC | #4
On 10 Dec 20:27, Stephen Finucane wrote:
> ...using the 'autopep8' tool.
> 
> Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>

Totally automated and therefore merged. Rebases will be tough, but I'll manage.

Merged.
Stephen Finucane Dec. 21, 2015, 2:52 p.m. UTC | #5
On 10 Dec 20:27, Stephen Finucane wrote:
> The 'autopep8' tool can't do everything, and it is necessary to resolve
> some final issues. Most of these issues fall under the following
> categories:
> 
>   E501  line too long
>   E241  multiple spaces after ','
>   F401  'module' imported but unused
>   F841  local variable 'name' is assigned to but never used
> 
> It is also necessary to insert '# noqa' comments to hide some F403
> errors ('unable to detect undefined names') where 'import *' is useful.
> 
> Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>

I've been using this internally with both Python 2 and 3 and seen only
one unrelated issue (which I'll fix shortly). I'm happy to merge and
have done so.

Merged.
diff mbox

Patch

diff --git a/tox.ini b/tox.ini
index a5bd898..77c450b 100644
--- a/tox.ini
+++ b/tox.ini
@@ -25,11 +25,11 @@  passenv =
 [testenv:pep8]
 basepython = python2.7
 deps = flake
-commands = flake8 {posargs} patchwork
+commands = flake8 {posargs} patchwork patchwork/bin/pwclient
 
 [flake8]
-ignore = E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E251,H405
-exclude = ./patchwork/tests
+ignore = E129
+exclude = ./patchwork/migrations
 
 [testenv:lint]
 basepython = python2.7