Skip to content

Commit 5948fb4

Browse files
committed
refactor: enhance autoapi_skip_member_fn to skip private variables and avoid documentation duplication
1 parent 1872a7f commit 5948fb4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/source/conf.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ def autoapi_skip_member_fn(app, what, name, obj, skip, options) -> bool: # noqa
8383
# Duplicate modules (skip module-level docs to avoid duplication)
8484
("module", "datafusion.col"),
8585
("module", "datafusion.udf"),
86+
# Private variables causing duplicate documentation
87+
("data", "datafusion.utils._PYARROW_DATASET_TYPES"),
88+
("variable", "datafusion.utils._PYARROW_DATASET_TYPES"),
8689
# Deprecated
8790
("class", "datafusion.substrait.serde"),
8891
("class", "datafusion.substrait.plan"),
@@ -94,6 +97,10 @@ def autoapi_skip_member_fn(app, what, name, obj, skip, options) -> bool: # noqa
9497
if (what, name) in skip_contents:
9598
skip = True
9699

100+
# Skip private members that start with underscore to avoid duplication
101+
if name.split(".")[-1].startswith("_") and what in ("data", "variable"):
102+
skip = True
103+
97104
return skip
98105

99106

0 commit comments

Comments
 (0)