Last Updated: February 25, 2016
·
420
· federicobond

Find PEP8 errors in a project

To list statistics of PEP8 errors in a project do:

pep8 --statistics -qq .

If you want to exclude a file pattern, just add --exclude:

pep8 --statistics -qq --exclude=env/ .

To sort them by count, pipe them through sort:

pep8 --statistics -qq --exclude=env/ . | sort -n -r

You can even ignore specific rules with --ignore:

pep8 --statistics -qq --exclude=env/ --ignore=E501 . | sort -n -r