Close #2106: autodoc: Support multiple signatures on docstring

This commit is contained in:
Takeshi KOMIYA
2020-05-30 13:15:19 +09:00
parent 9988d5ce26
commit 800dcf0f0a
5 changed files with 91 additions and 27 deletions

View File

@@ -346,6 +346,10 @@ def test_autoclass_content_and_docstring_signature_class(app):
'',
'.. py:class:: D()',
' :module: target.docstring_signature',
'',
'',
'.. py:class:: E()',
' :module: target.docstring_signature',
''
]
@@ -375,6 +379,11 @@ def test_autoclass_content_and_docstring_signature_init(app):
'',
'.. py:class:: D(foo, bar, baz)',
' :module: target.docstring_signature',
'',
'',
'.. py:class:: E(foo: int, bar: int, baz: int) -> None',
' E(foo: str, bar: str, baz: str) -> None',
' :module: target.docstring_signature',
''
]
@@ -409,6 +418,11 @@ def test_autoclass_content_and_docstring_signature_both(app):
'.. py:class:: D(foo, bar, baz)',
' :module: target.docstring_signature',
'',
'',
'.. py:class:: E(foo: int, bar: int, baz: int) -> None',
' E(foo: str, bar: str, baz: str) -> None',
' :module: target.docstring_signature',
'',
]