Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2021-09-26 20:21:14 +0300
committerGitHub <noreply@github.com>2021-09-26 20:21:14 +0300
commitd288907fd1338696934fbaefae4fc0e9d322389a (patch)
tree712a1506c31d069e332cdb1e96b7a52734a77528 /sphinx/util
parent10b7f0e2522e44fe33f900ef317c25bbadeeb5a0 (diff)
parent4a9e015fc6b87fc54c7a01f94d65bcf602fefeaa (diff)
Merge branch '4.x' into 9607_incorrect_orig_bases
Diffstat (limited to 'sphinx/util')
-rw-r--r--sphinx/util/typing.py2
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):