You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thanks so much for your work on this package! I've been considering transitioning to autoapi from sphinx-apidoc, but autoapi seems to be having trouble translating my type hints into nice, fully-hyperlinked types. Things seem to fail especialy when using type aliases and/or bracket notation. I've reproduced the problem in this toy example: https://github.com/wolearyc/autoapi-test.
Python file
"""Main file."""importnumpyasnpfromnumpy.typingimportNDArrayfromtypingimportSequence, Anydeffunction_a(x: NDArray[np.float64]):
"""Do something. Parameters ---------- x type hint doesn't link """passdeffunction_b(x: NDArray):
"""Do something. Parameters ---------- x type hint doesn't link """passdeffunction_b(x: np.ndarray):
"""Do something. Parameters ---------- x type hint works as expected """passdeffunction_b(x: np.ndarray[Any, np.dtype[np.float64]]):
"""Do something. Parameters ---------- x bits of pieces of the type are linked properly """pass
Sphinx generates the following documentation:
I think intersphinx is working properly, as in some cases the suitable links are generated. However, link generation fails in many of the cases. All of this works seamlessly with sphinx-apidoc (for example, see my current docs here https://ramannoodle.readthedocs.io/en/latest/generated/ramannoodle.dynamics.html), so I'm not sure what's going on.
Hopefully this is a simple fix and/or a silly goof on my part!
Hi,
First of all, thanks so much for your work on this package! I've been considering transitioning to autoapi from sphinx-apidoc, but autoapi seems to be having trouble translating my type hints into nice, fully-hyperlinked types. Things seem to fail especialy when using type aliases and/or bracket notation. I've reproduced the problem in this toy example:
https://github.com/wolearyc/autoapi-test.
Python file
Sphinx generates the following documentation:
I think intersphinx is working properly, as in some cases the suitable links are generated. However, link generation fails in many of the cases. All of this works seamlessly with sphinx-apidoc (for example, see my current docs here https://ramannoodle.readthedocs.io/en/latest/generated/ramannoodle.dynamics.html), so I'm not sure what's going on.
Hopefully this is a simple fix and/or a silly goof on my part!
OS: MacOS 14.6
Python: 3.12.4
autoapi: 3.3.1
Sphinx: 8.0.2
sphinx-autodoc-typehints: 2.4.4
The text was updated successfully, but these errors were encountered: