pybind11-stubgen
pybind11-stubgen copied to clipboard
Doc String for Overloaded Member Functions (Sphinx)
Hi,
has someone figured out how to see the individual docstrings of overloaded functions in Sphinx using autodoc?
Stubgen properly has per-method doc strings https://github.com/AMReX-Codes/pyamrex/blob/793ede5ab721e76f3fa547ae86249a1120f6bfb3/src/amrex/space3d/amrex_3d_pybind/init.pyi#L5155-L5208
as provided by my pybind11 overloads https://github.com/AMReX-Codes/pyamrex/blob/793ede5ab721e76f3fa547ae86249a1120f6bfb3/src/Base/MultiFab.cpp#L503-L547
But Sphinx
.. autoclass:: amrex.space3d.MultiFab
:members:
:undoc-members:
does end up with this
https://pyamrex.readthedocs.io/en/latest/usage/api.html#amrex.space3d.MultiFab.plus
Does anyone know how to show the per-overload doc strings instead? :)
Is that https://github.com/sphinx-doc/sphinx/issues/7787 ?