summaryrefslogtreecommitdiff
path: root/sphinx/util/inspect.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-11-09 02:48:55 +0900
committerGitHub <noreply@github.com>2020-11-09 02:48:55 +0900
commit7db3633778a24c4fc90c8a0ceb2318d6df7cf4e3 (patch)
tree974466008fe9453f5171721c370a984e9f25f014 /sphinx/util/inspect.py
parent5337e3848cce988d18a048aaa7a258b275d67e6d (diff)
parente2bf9166da3e89eb7cbe7abb9c1e47e34351bbf8 (diff)
downloadsphinx-git-7db3633778a24c4fc90c8a0ceb2318d6df7cf4e3.tar.gz
Merge pull request #8231 from tk0miya/8219_params_for_base_generic_class_is_not_shown
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