Zweistein
Zweistein

Reputation: 343

pep8 - statistics for whole project

I am working on a Python project and I am using the PyPI pep8 checker.

Is there a simple way to get a pep8 rating for my project? Like a percentage (eg. 10 lines doesn't match pep8, out of 100 lines) or any number to rate it?

As far as I know pep8 / pycodestyle do not provide such functionality.

Upvotes: 3

Views: 830

Answers (2)

abc
abc

Reputation: 11929

You might use Pylint. It provides a rating and a very nice and descriptive report.
In addition, there are more verification checks and options than just PEP8.

Upvotes: 3

bad_coder
bad_coder

Reputation: 12880

Depending on the code editor you use (PyCharm in my case), look for "run code inspection". That will give you all the warnings regarding PEP8 violations in your code.

EDIT: You mention that you're using "PyPI pep8 checker." On their github page it states they use pycodestyle to check the code, the main page explains how to get the statistics you asked for, and there's a more complete error list here. However, you're still probably better off using an IDE...

Upvotes: 1

Related Questions