Skip to content

Clarify the obj_type passed to autodoc-skip-member - #14802

Open
Corencas wants to merge 1 commit into
sphinx-doc:masterfrom
Corencas:docs-autodoc-skip-member-obj-type
Open

Corencas wants to merge 1 commit into
sphinx-doc:masterfrom
Corencas:docs-autodoc-skip-member-obj-type

Conversation

@Corencas

Copy link
Copy Markdown

Purpose

This fixes the obj_type argument in the autodoc-skip-member docs. autodoc passes
the type of the object whose members are being documented ('module', 'class', or
'exception'), not the type of the member. For bar in class Foo, obj_type is
'class'.

It also adds a note that autosummary emits the same event with different arguments:
obj_type is the member's own type (for example 'function' or 'method'), skip is
always False, and options is an empty dict. The autosummary page no longer says it
emits the event "as autodoc does".

#14629 already fixed the name argument, so this should finish #14555.

References

AI Disclosure

I used Claude Code to find where the event is emitted and to draft the wording. I checked
each claim against the code: _member_finder.py (autodoc passes props.obj_type, and
members are only gathered for module, class and exception), the legacy class-based
documenters (same behavior), and both emit sites in autosummary/generate.py
(_get_documenter(value, parent), False, {}).

I confirmed this by running a small test project.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant