]> arthur.barton.de Git - bup.git/commitdiff
CODINGSTYLE: convert to restructured text
authorRob Browning <rlb@defaultvalue.org>
Sun, 31 Dec 2017 17:53:16 +0000 (11:53 -0600)
committerRob Browning <rlb@defaultvalue.org>
Sun, 31 Dec 2017 18:10:59 +0000 (12:10 -0600)
CODINGSTYLE

index e28df2f30f29255421f3ceb2dff9a9efe5497b6a..12879e56b1873f06264aaa6d54021d78dc139f9b 100644 (file)
@@ -1,24 +1,27 @@
-Python code follows PEP8 [1] with regard to coding style and PEP257 [2] 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:
+.. -*-rst-*-
 
-def unlink(f):
-    """Delete a file at path 'f' if it currently exists.
+General
+=======
 
-    Unlike os.unlink(), does not throw an exception if the file didn't already
-    exist.
-    """
-    #code...
-
-Module-level docstrings follow exactly the same guidelines but without the
-blank line between the summary and the details.
+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.
 
-The C implementations should follow the kernel/git coding style [3].
+      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.
 
-[1]:http://www.python.org/dev/peps/pep-0008/
-[2]:http://www.python.org/dev/peps/pep-0257/
-[3]:http://www.kernel.org/doc/Documentation/CodingStyle
+The C implementations should follow the `kernel/git coding style
+<http://www.kernel.org/doc/Documentation/CodingStyle>`_.