Fix #4969: autodoc: constructor method should not have return annotation

This commit is contained in:
Takeshi KOMIYA
2018-05-14 23:35:52 +09:00
parent b22cdccd9a
commit b2abab1c45
4 changed files with 17 additions and 6 deletions

View File

@@ -280,6 +280,10 @@ def test_Signature_annotations():
sig = inspect.Signature(f11).format_args()
assert sig == '(x: CustomAnnotation, y: 123) -> None'
# has_retval=False
sig = inspect.Signature(f11, has_retval=False).format_args()
assert sig == '(x: CustomAnnotation, y: 123)'
def test_safe_getattr_with_default():
class Foo(object):