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
If you create your TypeVars in a private module, then re-export them via a public module, they lose their type comments when documented via an automodule directive.
In the reproducer below, V appears in the output, while T does not.
I will submit a PR fixing this with the reproducer as a unit test.
fromtypingimportTypeVarfrom ._privateimportT# Workaround just for sphinx...T=T"""A reimported TypeVar"""V=TypeVar("V")
"""A locally defined TypeVar"""__all__= ["T", "V"]
Describe the bug
If you create your TypeVars in a private module, then re-export them via a public module, they lose their type comments when documented via an
automodule
directive.In the reproducer below,
V
appears in the output, whileT
does not.I will submit a PR fixing this with the reproducer as a unit test.
How to Reproduce
mymodule/_private.py
:mymodule/__init__.py
:index.rst
:Environment Information
Sphinx extensions
`["sphinx.ext.autodoc"]`
Additional context
No response
The text was updated successfully, but these errors were encountered: