]> git.puffer.fish Git - matthieu/frr.git/commitdiff
doc: document use of black for python formatting
authorQuentin Young <qlyoung@nvidia.com>
Thu, 8 Oct 2020 16:53:13 +0000 (12:53 -0400)
committerQuentin Young <qlyoung@nvidia.com>
Thu, 8 Oct 2020 16:53:13 +0000 (12:53 -0400)
Also moves "Exceptions" for C code under the C subsection.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
doc/developer/workflow.rst

index f345464a354000663b016f64bbca61aa3d93eb2b..4183ac6480c7a78d954aa4b959a8651c1d895ddb 100644 (file)
@@ -779,13 +779,12 @@ necessary replacements.
 .. _style-exceptions:
 
 Exceptions
-^^^^^^^^^^
+""""""""""
 
 FRR project code comes from a variety of sources, so there are some
 stylistic exceptions in place. They are organized here by branch.
 
-For ``master``
-""""""""""""""
+For ``master``:
 
 BSD coding style applies to:
 
@@ -797,8 +796,7 @@ BSD coding style applies to:
 -  Indents are 4 spaces
 -  Function return types are on their own line
 
-For ``stable/3.0`` and ``stable/2.0``
-"""""""""""""""""""""""""""""""""""""
+For ``stable/3.0`` and ``stable/2.0``:
 
 GNU coding style apply to the following parts:
 
@@ -816,6 +814,21 @@ BSD coding style applies to:
 
 -  ``ldpd/``
 
+
+Python Code
+^^^^^^^^^^^
+
+Format all Python code with `black <https://github.com/psf/black>`_.
+
+In a line::
+
+   python3 -m black <file.py>
+
+Run this on any Python files you modify before committing.
+
+FRR's Python code has been formatted with black version 19.10b.
+
+
 YANG
 ^^^^