Merge pull request #8927 from tk0miya/8924_TypeVar_bound

Close #8924: autodoc: Support `bound` argument for TypeVar
This commit is contained in:
Takeshi KOMIYA
2021-02-26 02:00:40 +09:00
committed by GitHub
4 changed files with 14 additions and 0 deletions
@@ -17,6 +17,9 @@ T5 = TypeVar("T5", contravariant=True)
#: T6
T6 = NewType("T6", int)
#: T7
T7 = TypeVar("T7", bound=int)
class Class:
#: T1
+8
View File
@@ -1993,6 +1993,14 @@ def test_autodoc_TypeVar(app):
'',
' alias of :class:`int`',
'',
'',
'.. py:data:: T7',
' :module: target.typevar',
'',
' T7',
'',
" alias of TypeVar('T7', bound=\\ :class:`int`)",
'',
]