Skip to content

Commit 44c11f4

Browse files
committed
feat: add include_imports option to Auto
1 parent 1aebd82 commit 44c11f4

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

quartodoc/builder/blueprint.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,9 @@ def _fetch_members(el: Auto, obj: dc.Object | dc.Alias):
270270
if not el.include_private:
271271
options = {k: v for k, v in options.items() if not k.startswith("_")}
272272

273+
if not el.include_imports:
274+
options = {k: v for k, v in options.items() if not v.is_alias}
275+
273276
# for modules, remove any Alias objects, since they were imported from
274277
# other places. Sphinx has a flag for this behavior, so may be good
275278
# to do something similar.

quartodoc/layout.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@ class Auto(_Base):
196196
A list of members, such as attributes or methods on a class, to document.
197197
include_private:
198198
Whether to include members starting with "_"
199+
include_imports:
200+
Whether to include members that were imported from somewhere else.
199201
include:
200202
(Not implemented). A list of members to include.
201203
exclude:
@@ -216,6 +218,7 @@ class Auto(_Base):
216218
name: str
217219
members: Optional[list[str]] = None
218220
include_private: bool = False
221+
include_imports: bool = False
219222
include: Optional[str] = None
220223
exclude: Optional[str] = None
221224
dynamic: Union[None, bool, str] = None

0 commit comments

Comments
 (0)