Open hoefling opened 3 years ago
I have looked a bit up myself, the difference between the node in both modes is that in description
mode, it has node["refspecific"] = True
set in PyXrefMixin.make_xref()
. Thus, when the reference is resolved in ReferencesResolver.run
, the searchmode
in PythonDomain.resolve_xref
is 1 (vs 0 in signature
case). Hope this may be of any help!
Describe the bug This is the follow-up of #7119. When using
autodoc_typehints = "description"
inconf.py
, the references toTypeVar
s are not resolved.Your project demo.zip
To Reproduce Steps to reproduce the behavior:
Expected behavior The rendered parameter type in
element (x.T) –
should be referencingx.T
. Please note that whenautodoc_typehints = "description"
is turned off (or set back to"signature"
), the refs are present so the fix for #7119 works nicely; this is only not the case for"description"
.Screenshots
autodoc_typehints = "description"
:autodoc_typehints = "signature"
:Environment info
sphinx.ext.autodoc
Additional context Add any other context about the problem here.
7119