Skip to content

autodoc-skip-member documentation is incorrect #14555

Description

@ipilcher

Describe the bug

The documentation for the autodoc-skip-member event is incorrect in at least 2 ways.

  1. It says that the obj_type is "the type of the object which the docstring belongs to." It is actually the type of the enclosing "container"—module, class, exception, etc.
  2. It says that the name is the fully qualified name of the object. It is actually the unqualified name of the object.

How to Reproduce

Add the following to conf.py.

def skip_member_log(app, what, name, obj, skip, options):
    print(f'SKIP-MEMBER: what = {what}, name = {name}')
    return skip

def setup(app):
    app.connect('autodoc-skip-member', skip_member_log)

Run Sphinx (with the autodoc extension enabled against this class.

class Foo:
    bar = None

Note the following output.

SKIP-MEMBER: what = class, name = bar

The obj_type (what) argument is 'class' (the type of Foo, not the type of bar), and the name is not fully qualified.

Environment Information

Platform:              linux; (Linux-7.1.4-200.fc44.x86_64-x86_64-with-glibc2.43)
Python version:        3.14.6 (main, Jun 11 2026, 00:00:00) [GCC 16.1.1 20260515 (Red Hat 16.1.1-2)])
Python implementation: CPython
Sphinx version:        9.1.0
Docutils version:      0.22.4
Jinja2 version:        3.1.6
Pygments version:      2.19.1

Sphinx extensions

extensions = [
    'sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'sphinx.ext.napoleon'
]

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions