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:
authorAdam Turner <9087854+aa-turner@users.noreply.github.com>2022-04-09 22:38:47 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2022-04-16 10:31:52 +0300
commite7cba3516e6e3cd1cf90c29068c63c011e860204 (patch)
tree1c3b8696049de65f4261791975f64fd56925b287
parent4221d1a5163d023d80a34bd4a12e9c2a2c648ae3 (diff)
Fix test_restify
-rw-r--r--sphinx/util/typing.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/sphinx/util/typing.py b/sphinx/util/typing.py
index 1534b2c8e..8e48b184b 100644
--- a/sphinx/util/typing.py
+++ b/sphinx/util/typing.py
@@ -215,6 +215,9 @@ def _restify_py37(cls: Optional[Type], mode: str = 'fully-qualified-except-typin
return text
elif isinstance(cls, typing._SpecialForm):
return ':py:obj:`~%s.%s`' % (cls.__module__, cls._name)
+ elif sys.version_info >= (3, 11) and cls is typing.Any:
+ # handle bpo-46998
+ return f':py:obj:`~{cls.__module__}.{cls.__name__}`'
elif hasattr(cls, '__qualname__'):
if cls.__module__ == 'typing':
return ':py:class:`~%s.%s`' % (cls.__module__, cls.__qualname__)