Changes

From Gramps

Programming guidelines

No change in size, 11:07, 30 March 2010
no edit summary
In a multi-programmer environment, it is important to follow common coding guidelines to make sure the code remains maintainable.
== Coding Style style ==
=== PEP8 ===
** TAB stops (if any) are at position 9,17,25,... (first column is 1)
=== Members Names names ===
* Private class functions (functions that cannot be called outside the class) should be preceded with two underscores.
* Protected functions (functions that can only be called by the class or derived classes) should be preceded with one underscore.
<code>pylint</code> does not check that arguments are used when methods are named in this way. This is useful to avoid the <code>pylint</code> warning: 'W0613: Unused argument <arg>'.
== Class Headers headers ==
* Each class should have a simple header to help mark it in the file. This is not used for documentation - it is used to help find the class when multiple classes exist in the same file.
<code>
Set reports to n to have less output. Info on the codes can be found here: [http://www.logilab.org/card/pylintfeatures]
== Best Practices practices ==
* Always develop with [http://www.gramps-project.org/wiki/index.php?title=Coding_for_translation language translation] in mind
* Reduce dependencies (imports) between files.

Navigation menu