Skip to content

Commit 2ef9a9d

Browse files
committed
fix: respect __all__ when rendering children
1 parent 1668f92 commit 2ef9a9d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

autoapi/mappers/base.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,12 @@ def output_rst(self, root, source_suffix):
398398
with open(path, "wb+") as detail_file:
399399
detail_file.write(rst.encode("utf-8"))
400400

401-
for child in obj.children:
401+
if obj.all:
402+
children = [child for child in obj.children if child.short_name in obj.all]
403+
else:
404+
children = obj.children
405+
406+
for child in children:
402407
self.output_child_rst(child, obj, detail_dir, source_suffix)
403408

404409
if self.app.config.autoapi_add_toctree_entry:

0 commit comments

Comments
 (0)