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
{{ message }}
Repository navigation
Missing bound argument for TypeVar in output #8924
Describe the bug
When documenting a typing.TypeVar where the bound argument is specified, I would expect the generated document to show that information.
To Reproduce
$ git clone https://gitlab.com/joel.larose/sphinx_jpl.git
$ cd sphinx_jpl
$ pip install sphinx
$ make html
Compare typevar_example.py to build/html/modules/typevar_example.html
Notice that TypeE and TypeF are both defined with the bound argument, but it does not appear in the final document output.
Expected behaviour
Final output should include the bound argument when producing the output for a TypeVar
e.g.
TypeE=TypeVar('TypeE', bound=A)
"""This type variable is bound by class `A`"""
Should produce something like:
TypeE
This type variable is bound by class A
alias of TypeVar(‘TypeE’, bound=A)
Additional context
A patch to fix the output for the other arguments of TypeVar was completed in #8471
I suspect the fix for this would be very similar.
Activity
Close sphinx-doc#8924: autodoc: Support `bound` argument for TypeVar
Merge pull request #8927 from tk0miya/8924_TypeVar_bound
Master.patch (#1)