Skip to content
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

Doc String for Overloaded Member Functions (Sphinx) #221

Open
ax3l opened this issue Apr 3, 2024 · 1 comment
Open

Doc String for Overloaded Member Functions (Sphinx) #221

ax3l opened this issue Apr 3, 2024 · 1 comment

Comments

@ax3l
Copy link

ax3l commented Apr 3, 2024

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
Screenshot from 2024-04-03 15-41-12
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? :)

@ax3l
Copy link
Author

ax3l commented Apr 3, 2024

Is that sphinx-doc/sphinx#7787 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant