mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
autodoc: Support type_comment styled type annotation for variables
This commit is contained in:
@@ -1418,10 +1418,8 @@ def test_autodoc_typed_instance_variables(app):
|
||||
' .. py:attribute:: Class.attr3',
|
||||
' :module: target.typed_vars',
|
||||
' :type: int',
|
||||
' :value: None',
|
||||
' :value: 0',
|
||||
' ',
|
||||
' attr3',
|
||||
' ',
|
||||
' ',
|
||||
' .. py:attribute:: Class.attr4',
|
||||
' :module: target.typed_vars',
|
||||
@@ -1430,6 +1428,22 @@ def test_autodoc_typed_instance_variables(app):
|
||||
' ',
|
||||
' attr4',
|
||||
' ',
|
||||
' ',
|
||||
' .. py:attribute:: Class.attr5',
|
||||
' :module: target.typed_vars',
|
||||
' :type: int',
|
||||
' :value: None',
|
||||
' ',
|
||||
' attr5',
|
||||
' ',
|
||||
' ',
|
||||
' .. py:attribute:: Class.attr6',
|
||||
' :module: target.typed_vars',
|
||||
' :type: int',
|
||||
' :value: None',
|
||||
' ',
|
||||
' attr6',
|
||||
' ',
|
||||
'',
|
||||
'.. py:data:: attr1',
|
||||
' :module: target.typed_vars',
|
||||
@@ -1442,9 +1456,17 @@ def test_autodoc_typed_instance_variables(app):
|
||||
'.. py:data:: attr2',
|
||||
' :module: target.typed_vars',
|
||||
' :type: str',
|
||||
" :value: None",
|
||||
' :value: None',
|
||||
'',
|
||||
' attr2',
|
||||
' ',
|
||||
'',
|
||||
'.. py:data:: attr3',
|
||||
' :module: target.typed_vars',
|
||||
' :type: str',
|
||||
" :value: ''",
|
||||
'',
|
||||
' attr3',
|
||||
' '
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user