Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
kislyuk committed Feb 6, 2024
1 parent bd3bbd6 commit 3329324
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/scripts/build-ghautodoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,13 @@ def get_node_annotation(node, node_type):
def get_documentables(module_node):
documentables = defaultdict(dict)
for node in module_node.body:
if node.name.startswith("_"):
continue
if isinstance(node, ast.FunctionDef):
if isinstance(node, ast.FunctionDef) and not node.name.startswith("_"):
documentables[node.lineno] = get_node_annotation(node, "function")
elif isinstance(node, ast.ClassDef):
elif isinstance(node, ast.ClassDef) and not node.name.startswith("_"):
documentables[node.lineno] = get_node_annotation(node, "class")
for subnode in node.body:
if subnode.name.startswith("_"):
continue
if isinstance(subnode, ast.FunctionDef):
documentables[subnode.lineno] = get_node_annotation(
subnode, "method"
Expand Down

0 comments on commit 3329324

Please sign in to comment.