How do you PEP8 check your python code before merging it into the branch?

Asked by Daniel Stenlöv

What is PEP8 and why should I follow it and how do I check if my code follows PEP8?

Question information

Language:
English Edit question
Status:
Solved
For:
OpenMRP Edit question
Assignee:
No assignee Edit question
Solved by:
Daniel Stenlöv
Solved:
Last query:
Last reply:
Revision history for this message
Daniel Stenlöv (daniel-stenlov-xclude) said :
#1

PEP8 is a style guide for python code that has by many become a coding standard for OpenERP code.[1] There are different addons to a lot of development tools that does a PEP8 test of the code. However if your development tool doesn't support PEP8 compability tests, you can download the pep8 python module and run manual tests on any system.[2]

One of the main reasons for following PEP8 is to make the code easier to read and easier to understand.

[1] http://www.python.org/dev/peps/pep-0008/
[2] https://github.com/jcrocholl/pep8/