]> arthur.barton.de Git - bup.git/blob - CODINGSTYLE
CODINGSTYLE: convert to restructured text
[bup.git] / CODINGSTYLE
1 .. -*-rst-*-
2
3 General
4 =======
5
6 Python code follows `PEP8 <http://www.python.org/dev/peps/pep-0008/>`_
7 with regard to coding style and `PEP257
8 <http://www.python.org/dev/peps/pep-0257/>`_ with regard to docstring
9 style. Multi-line docstrings should have one short summary line,
10 followed by a blank line and a series of paragraphs. The last
11 paragraph should be followed by a line that closes the docstring (no
12 blank line in between). Here's an example from
13 ``lib/bup/helpers.py``::
14
15   def unlink(f):
16       """Delete a file at path 'f' if it currently exists.
17
18       Unlike os.unlink(), does not throw an exception if the file didn't already
19       exist.
20       """
21       ...
22
23 Module-level docstrings follow exactly the same guidelines but without the
24 blank line between the summary and the details.
25
26 The C implementations should follow the `kernel/git coding style
27 <http://www.kernel.org/doc/Documentation/CodingStyle>`_.