[Bf-blender-cvs] [eb8155ebcde] blender-v3.4-release: PyDoc: Make rst files more readable
Aaron Carlisle
noreply at git.blender.org
Fri Nov 4 04:40:27 CET 2022
Commit: eb8155ebcde28fe924dfae464a1b09bd3d16edfd
Author: Aaron Carlisle
Date: Thu Nov 3 23:36:12 2022 -0400
Branches: blender-v3.4-release
https://developer.blender.org/rBeb8155ebcde28fe924dfae464a1b09bd3d16edfd
PyDoc: Make rst files more readable
This commit reduces the amount of white space generated and keeps parameter documentation of a single line.
This makes the resulting rst files easier to read in the case of debugging.
This was useful while looking into T97464
===================================================================
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 7b5f13177ef..f51ab8d6591 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -1459,15 +1459,15 @@ def pyrna2sphinx(basepath):
# If the link has been written, no need to inline the enum items.
enum_text = "" if enum_descr_override else pyrna_enum2sphinx(prop)
if prop.name or prop.description or enum_text:
- fw(ident + ":%s%s:\n\n" % (id_name, identifier))
+ fw(ident + ":%s%s: " % (id_name, identifier))
if prop.name or prop.description:
- fw(indent(", ".join(val for val in (prop.name, prop.description) if val), ident + " ") + "\n\n")
+ fw(", ".join(val for val in (prop.name, prop.description.replace("\n", "")) if val) + "\n")
# Special exception, can't use generic code here for enums.
if enum_text:
- write_indented_lines(ident + " ", fw, enum_text)
fw("\n")
+ write_indented_lines(ident + " ", fw, enum_text)
del enum_text
# end enum exception
More information about the Bf-blender-cvs
mailing list