diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-09-26 20:21:14 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-26 20:21:14 +0300 |
commit | d288907fd1338696934fbaefae4fc0e9d322389a (patch) | |
tree | 712a1506c31d069e332cdb1e96b7a52734a77528 /sphinx/util | |
parent | 10b7f0e2522e44fe33f900ef317c25bbadeeb5a0 (diff) | |
parent | 4a9e015fc6b87fc54c7a01f94d65bcf602fefeaa (diff) |
Merge branch '4.x' into 9607_incorrect_orig_bases
Diffstat (limited to 'sphinx/util')
-rw-r--r-- | sphinx/util/typing.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sphinx/util/typing.py b/sphinx/util/typing.py index 7380f4783..87707d48f 100644 --- a/sphinx/util/typing.py +++ b/sphinx/util/typing.py @@ -113,6 +113,8 @@ def restify(cls: Optional[Type]) -> str: return ':py:obj:`None`' elif cls is Ellipsis: return '...' + elif isinstance(cls, str): + return cls elif cls in INVALID_BUILTIN_CLASSES: return ':py:class:`%s`' % INVALID_BUILTIN_CLASSES[cls] elif inspect.isNewType(cls): |