diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-11-09 02:48:55 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-09 02:48:55 +0900 |
commit | 7db3633778a24c4fc90c8a0ceb2318d6df7cf4e3 (patch) | |
tree | 974466008fe9453f5171721c370a984e9f25f014 /sphinx/util/inspect.py | |
parent | 5337e3848cce988d18a048aaa7a258b275d67e6d (diff) | |
parent | e2bf9166da3e89eb7cbe7abb9c1e47e34351bbf8 (diff) | |
download | sphinx-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.py | 3 |
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 |