Docs: avoid plank comma in API reference
authorCampbell Barton <ideasman42@gmail.com>
Mon, 25 Jan 2016 09:25:28 +0000 (20:25 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 25 Jan 2016 09:26:39 +0000 (20:26 +1100)
doc/python_api/sphinx_doc_gen.py

index 1788b4cdcbc5acedef89a68ae355eb8cc03cb335..7f45335824a0c18e9dcfc5344a6b809a69c0520b 100644 (file)
@@ -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)