-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
autoclass digests types from typehint but numpy types are not linked via intersphinx #10746
Comments
See https://github.com/1kastner/conflowgen/blob/main/docs/conf.py#L114 for the inventory. |
Completely my bad. I did not import |
@1kastner - I'm having a similar issue. Where (in what file) were you missing the |
In the file that contained the auto-documented class. |
Describe the bug
I use numpy types in my function and method typehints. Unlike #10151, I do not want to repeat the types in the docstring. I prefer the types to show up in the signature and only there. Usually, Sphinx does a very decent job injecting the types into the signature. Here, also intersphinx comes into play and adds links to Python types such as integers, datetime objects, etc.
Recently, I added numpy to the stack. Somehow, intersphinx does not create links for these types even though its inventory is added to
intersphinx_mapping
.How to Reproduce
Expected behavior
numpy.typing.ArrayLike
should be detected by intersphinx and converted into a linkYour project
https://github.com/1kastner/conflowgen
Screenshots
Here, I played around and also included the typehints into the description of the class. Still no clickable links.
OS
Windows
Python version
3.9
Sphinx version
4.5
Sphinx extensions
['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.napoleon', 'sphinx.ext.mathjax', 'sphinx.ext.intersphinx', 'sphinx.ext.autosectionlabel', 'sphinx.ext.viewcode', 'sphinxcontrib.bibtex', 'myst_parser', 'sphinx_math_dollar', 'enum_tools.autoenum', 'sphinx_toolbox.more_autodoc.autonamedtuple', 'nbsphinx']
Extra tools
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: