health-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Health-dev] Coding style


From: Cédric Krier
Subject: [Health-dev] Coding style
Date: Fri, 25 Dec 2015 17:32:58 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

Hi,

I just finished to fix/add unit tests to all GNU Health modules (so
don't forget to run them before committing).
So the next task, I would like to start is coding style. I would like to
suggest to use the same one as the Tryton project which is mainly pep8
plus minor exception for code maintenance.
https://code.google.com/p/tryton/wiki/CodingGuidelines

A first run of flake8 on health module shows those statistics:

    1       E121 continuation line under-indented for hanging indent
    4       E122 continuation line missing indentation or outdented
    1       E129 visually indented line with same indent as next logical line
    6       E131 continuation line unaligned for hanging indent
    1       E201 whitespace after '('
    14      E202 whitespace before ')'
    6       E203 whitespace before ':'
    4       E211 whitespace before '('
    26      E225 missing whitespace around operator
    5       E226 missing whitespace around arithmetic operator
    136     E231 missing whitespace after ','
    1       E241 multiple spaces after ','
    182     E251 unexpected spaces around keyword / parameter equals
    9       E265 block comment should start with '# '
    28      E302 expected 2 blank lines, found 1
    58      E303 too many blank lines (2)
    2       E304 blank lines found after function decorator
    29      E501 line too long (80 > 79 characters)
    8       E502 the backslash is redundant between brackets
    1       E712 comparison to True should be 'if cond is True:' or 'if cond:'
    1       E713 test for membership should be 'not in'
    14      F401 'grouped_slice' imported but unused
    7       F403 'from health import *' used; unable to detect undefined names
    1       F811 redefinition of unused '__setup__' from line 2076
    10      F841 local variable 'config' is assigned to but never used
    60      W291 trailing whitespace
    122     W293 blank line contains whitespace
    2       W391 blank line at end of file


What do you think?

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: address@hidden
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

Attachment: pgpIJ2uGAEG8G.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]