[Bf-blender-cvs] [e3a76feeefa] blender-v2.93-release: Fix PyAPI doc generation error in 43369ca80e62aa80b951823d1c78abef58852014
Campbell Barton
noreply at git.blender.org
Mon May 17 10:04:14 CEST 2021
Commit: e3a76feeefa9ff7278a6f79fd5905f762462b485
Author: Campbell Barton
Date: Mon May 17 17:56:18 2021 +1000
Branches: blender-v2.93-release
https://developer.blender.org/rBe3a76feeefa9ff7278a6f79fd5905f762462b485
Fix PyAPI doc generation error in 43369ca80e62aa80b951823d1c78abef58852014
Files without doc-strings were not included.
===================================================================
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 8be194a58a2..107c233134e 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -545,6 +545,13 @@ def range_str(val):
def example_extract_docstring(filepath):
+ '''
+ Return (text, line_no, line_no_has_content) where:
+ - ``text`` is the doc-string text.
+ - ``line_no`` is the line the doc-string text ends.
+ - ``line_no_has_content`` when False, this file only contains a doc-string.
+ There is no need to include the remainder.
+ '''
file = open(filepath, "r", encoding="utf-8")
line = file.readline()
line_no = 0
@@ -553,7 +560,7 @@ def example_extract_docstring(filepath):
line_no += 1
else:
file.close()
- return "", 0, False
+ return "", 0, True
for line in file:
line_no += 1
More information about the Bf-blender-cvs
mailing list