sphinx-autodoc-typehints icon indicating copy to clipboard operation
sphinx-autodoc-typehints copied to clipboard

sphinx-autodoc-typehints & numpydoc

Open jrast opened this issue 2 years ago • 2 comments

In https://github.com/numpy/numpydoc/issues/196 it was discussed how numpydoc could better handle type annotations. As sphinx-autodoc-typehints already provides a way to pull the type annotations from the signature to the docs it would be nice to use the extension in combination in numpydoc. However, a short test showed that this is currently not working:

2023-04-17_18h03_40

Files for Reproduction: DemoProject.zip

Would it be feasible to implement the sphinx-autodoc-typehints + numpydoc combination? Or is the current behavior due to a wrong setting (for the demo the default settings were used)?

jrast avatar Apr 17 '23 16:04 jrast

A PR to add support would be welcome, however we don't plan to work on it ourselves.

gaborbernat avatar Apr 17 '23 16:04 gaborbernat

I realy only know numpydoc from using it, so I don't think I would be able to implement something like this. It seems like numpydoc generates a different structure for the output than napoleon. Maybe @rth can take a look at it?

jrast avatar Apr 17 '23 19:04 jrast