diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2022-04-16 10:32:10 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2022-04-16 10:32:10 +0300 |
commit | 8d4d47f1bf4ca4b3e761c903ff3e03335ec2528c (patch) | |
tree | 392400986a90db61daa74bfb60f0f08dd0a4eb2c | |
parent | b9d119df0f29fcaf74205e7d6859a484fa051544 (diff) | |
parent | e7cba3516e6e3cd1cf90c29068c63c011e860204 (diff) |
Merge branch '4.5.x' into 4.x
-rw-r--r-- | sphinx/util/typing.py | 3 |
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__) |