diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-05-17 11:04:22 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-05-17 11:04:22 +0300 |
commit | 7e552b356d833107289c942295c3ddcb0cbf9dae (patch) | |
tree | 61b8879a98e8eb40bad33f4255bedabce3d97fd6 /doc/python_api | |
parent | e95f71bf152ad227383c3512f848cd924512a68b (diff) | |
parent | e3a76feeefa9ff7278a6f79fd5905f762462b485 (diff) |
Merge branch 'blender-v2.93-release'
Diffstat (limited to 'doc/python_api')
-rw-r--r-- | doc/python_api/sphinx_doc_gen.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py index 94c69be5530..032f8a86bd5 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 |