StyleGuide
Coding style guide for project contributors.
IntroductionAdditions and modifications to the code in this project should conform to these style guidelines. RulesNaming conventions
ImportsAlways import modules explicitly - never use from x import *, instead use from x import y from x import z import w Global VariablesGlobal (module visible) variables should only be used for constants. Default Argument ValuesFeel free to use them in accordance with the following guidelines
Foo(1) Foo(1, b=2) Line Length80 characters Blank Lines1 blank line between methods within a class, between the docstring and code and within a method to break the instructions into logical sections. 2 blank lines between top level definitions. For example import xyz class Foo(object): def __init__(self): pass def do_something(self): pass def module_function(): return 'ok' if __name__ == '__main__': print 'Running this module as a script.' Unit TestsBug fixes and new modules should be accompanied with test cases in the appropriate test modules. The test module directory structure mirrors that of the src directory. For example, unit tests for the gdata.data module live in tests/gdata_tests/data_test.py. If you have written a new module, you can speed up the process of writing you unit tests by using one of the available CodeTemplates. |
It might be a good idea publishing a list of PyLint? command line options for the code to be checked against