Community mailing list archives

Re: Proposal to review the OCA contribution guidelines

by Quentin THEURET <> - 08/13/2014 08:33:57

On 13/08/14 14:04, Luc De Meyer wrote:
> Since I am working with OpenERP/Odoo (5 years now) I have never seen an
> RFP nor a customer demand to deliver a PEP8 compliant solution.

PEP8 is not for customer, it's for developers.

> Hence why should we add this extra barrier ?

It's just like some rules/laws… You are right to be in opposition with 
them but they are here to help everyone to live with the same common rules.

PEP8 defines some rules to help Python developers to have the same 
coding rules than others. It allows to have a more readable code (e.g.: 
a tab is replaced by 4 spaces) with the same standard (e.g.: camel case 
for class name).
The more intrusive rule of the PEP8 is the 80 characters for a line, we 
have already discuss about that and we decide *all together*. I remind 
you that PEP8 allows teams to define 100 characters for a line (but we 
decided that 80 is the standard for OCA) :

Why wait that Odoo modules are PEP8 compliant to make the OCA modules 
PEP8 compliant ?

You can develop Python modules that are not PEP8 compliant, but it's 
like coding HTML that are not W3C compliant : you can but it's not the 
perfect way…

Python is one of the only programming langage that defines coding 
standards, it will be a mess to don't use them.