diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-11-22 09:15:52 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-11-22 09:15:52 +0400 |
commit | 9d0334bc74b87fc47e54984e8ede7bea84a5b302 (patch) | |
tree | 7fef694c5a83c90aaa661388449db97e3ad3d5fc /source/tests | |
parent | 55535b21feafd7bf22aa565e8048b02c0fc76cf7 (diff) |
add missing bgl and gpu api docstrings (found using docstring completeness checker)
Diffstat (limited to 'source/tests')
-rw-r--r-- | source/tests/bl_rst_completeness.py | 2 | ||||
-rw-r--r-- | source/tests/rst_to_doctree_mini.py | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/source/tests/bl_rst_completeness.py b/source/tests/bl_rst_completeness.py index 175d0a4231b..e9e2779bda8 100644 --- a/source/tests/bl_rst_completeness.py +++ b/source/tests/bl_rst_completeness.py @@ -29,6 +29,7 @@ exec(compile(open(filepath).read(), filepath, 'exec')) ''' import os + THIS_DIR = os.path.dirname(__file__) RST_DIR = os.path.normpath(os.path.join(THIS_DIR, "..", "..", "doc", "python_api", "rst")) @@ -138,7 +139,6 @@ def main(): if bge is None: print("Skipping BGE modules!") - continue for filename, modname, partial_ok in modules: if bge is None and modname.startswith("bge"): diff --git a/source/tests/rst_to_doctree_mini.py b/source/tests/rst_to_doctree_mini.py index 19c20ccc006..181037299cf 100644 --- a/source/tests/rst_to_doctree_mini.py +++ b/source/tests/rst_to_doctree_mini.py @@ -47,7 +47,8 @@ def parse_rst_py(filepath): re_prefix = re.compile(r"^\.\.\s([a-zA-Z09\-]+)::\s*(.*)\s*$") tree = collections.defaultdict(list) - + indent_map = {} + indent_prev = 0 f = open(filepath, encoding="utf-8") indent_lists = [] for i, line in enumerate(f): @@ -70,12 +71,11 @@ def parse_rst_py(filepath): members=[]) tree[indent].append(item) + if indent_prev < indent: + indent_map[indent] = indent_prev if indent > 0: - # get the previous indent, ok this isn't fast but no matter. - keys = list(sorted(tree.keys())) - key_index = keys.index(indent) - parent_indent = keys[key_index - 1] - tree[parent_indent][-1].members.append(item) + tree[indent_map[indent]][-1].members.append(item) + indent_prev = indent f.close() return tree[0] |