File: CODINGSTYLE

package info (click to toggle)
bup 0.33.9-1.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,712 kB
  • sloc: python: 15,897; sh: 5,764; ansic: 2,965; pascal: 669; makefile: 21
file content (31 lines) | stat: -rw-r--r-- 923 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
.. -*-rst-*-

C
=

The C implementations should follow the `kernel/git coding style
<http://www.kernel.org/doc/Documentation/CodingStyle>`_.


Python
======

Python code follows `PEP8 <http://www.python.org/dev/peps/pep-0008/>`_
with regard to coding style and `PEP257
<http://www.python.org/dev/peps/pep-0257/>`_ with regard to docstring
style. Multi-line docstrings should have one short summary line,
followed by a blank line and a series of paragraphs. The last
paragraph should be followed by a line that closes the docstring (no
blank line in between). Here's an example from
``lib/bup/helpers.py``::

  def unlink(f):
      """Delete a file at path 'f' if it currently exists.

      Unlike os.unlink(), does not throw an exception if the file didn't already
      exist.
      """
      ...

Module-level docstrings follow exactly the same guidelines but without the
blank line between the summary and the details.