[Bf-blender-cvs] [f233770] master: Docs: avoid plank comma in API reference

Campbell Barton noreply at git.blender.org
Mon Jan 25 10:34:35 CET 2016


Commit: f233770ef810cd62e58ba64802a442b4421e2948
Author: Campbell Barton
Date:   Mon Jan 25 20:25:28 2016 +1100
Branches: master
https://developer.blender.org/rBf233770ef810cd62e58ba64802a442b4421e2948

Docs: avoid plank comma in API reference

===================================================================

M	doc/python_api/sphinx_doc_gen.py

===================================================================

diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py
index 1788b4c..7f45335 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -1345,7 +1345,10 @@ def pyrna2sphinx(basepath):
                     descr = prop.description
                     if not descr:
                         descr = prop.name
-                    fw("         `%s`, %s, %s\n\n" % (prop.identifier, descr, type_descr))
+                    # In rare cases descr may be empty
+                    fw("         `%s`, %s\n\n" %
+                       (prop.identifier,
+                        ", ".join((val for val in (descr, type_descr) if val))))
 
             write_example_ref("      ", fw, "bpy.types." + struct_id + "." + func.identifier)




More information about the Bf-blender-cvs mailing list