mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
Fix #3135: `sphinx.ext.autodoc` crashes with plain Callable
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user