mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-07-30 08:07:58 -05:00
Merge pull request #8927 from tk0miya/8924_TypeVar_bound
Close #8924: autodoc: Support `bound` argument for TypeVar
This commit is contained in:
@@ -17,6 +17,9 @@ T5 = TypeVar("T5", contravariant=True)
|
||||
#: T6
|
||||
T6 = NewType("T6", int)
|
||||
|
||||
#: T7
|
||||
T7 = TypeVar("T7", bound=int)
|
||||
|
||||
|
||||
class Class:
|
||||
#: T1
|
||||
|
||||
@@ -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`)",
|
||||
'',
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user