mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix annotations formatting for plain typing.Callable
The typing.Callable class may be used without generic arguments, in which case it is equivalent to collections.abc.Callable.
This commit is contained in:
@@ -48,7 +48,11 @@ def f8(x: Callable[[int, str], int]) -> None:
|
||||
pass
|
||||
|
||||
|
||||
def f9(x: Tuple[int, str], y: Tuple[int, ...]) -> None:
|
||||
def f9(x: Callable) -> None:
|
||||
pass
|
||||
|
||||
|
||||
def f10(x: Tuple[int, str], y: Tuple[int, ...]) -> None:
|
||||
pass
|
||||
|
||||
|
||||
@@ -56,5 +60,6 @@ class CustomAnnotation:
|
||||
def __repr__(self):
|
||||
return 'CustomAnnotation'
|
||||
|
||||
def f10(x: CustomAnnotation(), y: 123) -> None:
|
||||
|
||||
def f11(x: CustomAnnotation(), y: 123) -> None:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user