Skip to content

Commit b014f81

Browse files
committed
feat(layout): add optional package field to Auto
1 parent 24bece8 commit b014f81

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

quartodoc/layout.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ class Auto(_Base):
214214
exclude: Optional[str] = None
215215
dynamic: Union[bool, str] = False
216216
children: ChoicesChildren = ChoicesChildren.embedded
217+
package: Optional[str] = MISSING()
217218

218219

219220
# TODO: rename to Default or something

quartodoc/tests/test_builder_blueprint.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,12 @@ def test_blueprint_visit_module(bp, dynamic):
7070
assert len(res.members) == 1
7171
assert res.members[0].name == "a_func"
7272
assert res.members[0].obj.path == path.replace(":", ".") + ".a_func"
73+
74+
75+
def test_blueprint_auto_package(bp):
76+
auto = lo.Auto(name="a_func", package="quartodoc.tests.example")
77+
res = bp.visit(auto)
78+
79+
assert isinstance(res, lo.DocFunction)
80+
assert res.name == "a_func"
81+
assert res.anchor == "quartodoc.tests.example.a_func"

0 commit comments

Comments
 (0)