hayd / pep8radius

PEP8 clean only the parts of the files touched since the last commit, a previous commit or (the merge-base of) a branch.
MIT License
183 stars 9 forks source link

Package ignoring PEP E303 - Too many blank lines #87

Open thundergolfer opened 6 years ago

thundergolfer commented 6 years ago

Hey,

I got onto this package after trying to find a better solution than autopep for running against git diff, and this looks to be just the trick.

However, in my early use of this package it seems that it regularly ignores the E303 PEP. If I run flake8 against my diff and then run pep8radius master --in-place -v I get the following output.

cherub/classifier/my_extractor.py:25:5: E303 too many blank lines (7)
cherub/cli/invoke_mixer.py:32:5: E303 too many blank lines (2)
.
.
.
pep8radius fixed 0 lines in 3 files.

flake8 recognises the errors but pep8radius doesn't fix them

Reproducing

To reproduce this error, just start adding excessive whitespace between functions and within functions. Only very rarely does pep8radius recognise and fix them.