Skip to content

Napoleon skips documentend speical members even with napoleon_include_special_with_doc=True #14515

Description

@ilia-kats

Describe the bug

Napoleon's _skip_member handler always returns None, even if napoleon_include_special_with_doc is set to True. I think this is because _skip_member assumes its what argument is the object that the member belongs to (so for example, if the member is a method, what is supposed to be class, but that is not what it is: According to the autodoc documentation, what (or obj_type, as it's called there) is the type of the object that the docstring belongs to (so it would be method).

How to Reproduce

conf.py:

from pathlib import Path
import sys
sys.path.insert(0, str(Path(__file__).parent))
extensions = [
    "sphinx.ext.autodoc",
    "sphinx.ext.autosummary",
    "sphinx.ext.napoleon",
]
napoleon_include_special_with_doc = True

test.py:

class Test:
    def publicmethod(a, b, c):
        """Public method docs."""
    def __call__(x, y, z):
        """Test documentation."""

index.rst:

.. module:: test

.. autosummary::
  :toctree: generated

  Test

Observe that publicmethod shows up in the built HTML documentation, but __call__ does not.

Environment Information

Platform:              linux; (Linux-6.12.12+bpo-amd64-x86_64-with-glibc2.36)
Python version:        3.12.12 (main, Feb 12 2026, 00:42:14) [Clang 21.1.4 ])
Python implementation: CPython
Sphinx version:        9.1.0
Docutils version:      0.22.4
Jinja2 version:        3.1.6
Pygments version:      2.20.0

Sphinx extensions

[
    "sphinx.ext.autodoc",
    "sphinx.ext.autosummary",
    "sphinx.ext.napoleon",
]

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions