Closed anntzer closed 2 years ago
I think it'd make sense to not add the :class:
for builtins, since they're not going to link anyway for pretty much every project using Sphinx.
Revisiting this, it looks like Sphinx tries to link unannotated types automatically, but it won't look in any intersphinx docs.
It also turns out the Python docs actually has an intersphinx database as well, so I guess this behaviour should be configurable.
Please check again with latest release and report back if the problem is still active.
Consider the apidocs, using sphinx-autodoc-typehints, of
By default, for f1,
int
is rendered in italic while forf2
, it is rendered in bold. This is due to the fact that sphinx-autodoc-typehint adds a:py:class:
in front of the typename.While this may be semantically correct, this is inconsistent with sphinx's default recommendation (http://www.sphinx-doc.org/en/stable/domains.html#info-field-lists), so I think this should be off by default.