summaryrefslogtreecommitdiff
path: root/sphinx/util/inspect.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-09-21 21:47:58 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-11-09 02:34:49 +0900
commite2bf9166da3e89eb7cbe7abb9c1e47e34351bbf8 (patch)
tree974466008fe9453f5171721c370a984e9f25f014 /sphinx/util/inspect.py
parent5337e3848cce988d18a048aaa7a258b275d67e6d (diff)
downloadsphinx-git-e2bf9166da3e89eb7cbe7abb9c1e47e34351bbf8.tar.gz
Fix #8219: autodoc: Parameters for generic base class are not shown
Diffstat (limited to 'sphinx/util/inspect.py')
-rw-r--r--sphinx/util/inspect.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/sphinx/util/inspect.py b/sphinx/util/inspect.py
index 27f478675..1eaccb678 100644
--- a/sphinx/util/inspect.py
+++ b/sphinx/util/inspect.py
@@ -312,6 +312,9 @@ def isgenericalias(obj: Any) -> bool:
elif (hasattr(types, 'GenericAlias') and # only for py39+
isinstance(obj, types.GenericAlias)): # type: ignore
return True
+ elif (hasattr(typing, '_SpecialGenericAlias') and # for py39+
+ isinstance(obj, typing._SpecialGenericAlias)): # type: ignore
+ return True
else:
return False