8000 DOC Skip @property on classes in the auto generated API reference by betatim · Pull Request #30989 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

DOC Skip @property on classes in the auto generated API reference #30989

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,15 @@ def disable_plot_gallery_for_linkcheck(app):
sphinx_gallery_conf["plot_gallery"] = "False"


def skip_properties(app, what, name, obj, skip, options):
"""Skip properties that are fitted attributes"""
if isinstance(obj, property):
if name.endswith("_") and not name.startswith("_"):
return True

return skip


def setup(app):
# do not run the examples when using linkcheck by using a small priority
# (default priority is 500 and sphinx-gallery using builder-inited event too)
Expand All @@ -811,6 +820,8 @@ def setup(app):
app.connect("build-finished", make_carousel_thumbs)
app.connect("build-finished", filter_search_index)

app.connect("autodoc-skip-member", skip_properties)


# The following is used by sphinx.ext.linkcode to provide links to github
linkcode_resolve = make_linkcode_resolve(
Expand Down
0