Fix #10027: autodoc_typehints_format does not work with :show-inheritance:

This commit is contained in:
Takeshi KOMIYA
2022-01-01 14:54:08 +09:00
parent 6df45e0ead
commit 3fc98a2b3d
7 changed files with 107 additions and 11 deletions

View File

@@ -9,3 +9,6 @@ C = Callable[[int], None] # a generic alias not having a doccomment
class Class:
#: A list of int
T = List[int]
#: A list of Class
L = List[Class]

View File

@@ -1,3 +1,4 @@
from datetime import date
from typing import NewType, TypeVar
#: T1
@@ -15,7 +16,7 @@ T4 = TypeVar("T4", covariant=True)
T5 = TypeVar("T5", contravariant=True)
#: T6
T6 = NewType("T6", int)
T6 = NewType("T6", date)
#: T7
T7 = TypeVar("T7", bound=int)
@@ -26,4 +27,4 @@ class Class:
T1 = TypeVar("T1")
#: T6
T6 = NewType("T6", int)
T6 = NewType("T6", date)