Fix #3135: `sphinx.ext.autodoc` crashes with plain Callable

This commit is contained in:
Takeshi KOMIYA
2016-11-13 00:01:41 +09:00
parent a2102d66ec
commit 4ca84aba45
6 changed files with 17 additions and 6 deletions
+7 -2
View File
@@ -44,7 +44,11 @@ def f7(x: Callable[[int, str], int]) -> None:
pass
def f8(x: Tuple[int, str], y: Tuple[int, ...]) -> None:
def f8(x: Callable) -> None:
pass
def f9(x: Tuple[int, str], y: Tuple[int, ...]) -> None:
pass
@@ -52,5 +56,6 @@ class CustomAnnotation:
def __repr__(self):
return 'CustomAnnotation'
def f9(x: CustomAnnotation(), y: 123) -> None:
def f10(x: CustomAnnotation(), y: 123) -> None:
pass