From d480447cc6a6de3f836e6f546344526a5a7032ff Mon Sep 17 00:00:00 2001 From: James <50501825+Gobot1234@users.noreply.github.com> Date: Sun, 1 Aug 2021 19:01:55 +0100 Subject: [PATCH] Match formatting of other recursive types --- sphinx/util/typing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinx/util/typing.py b/sphinx/util/typing.py index bd2a2ad38..94a84d96f 100644 --- a/sphinx/util/typing.py +++ b/sphinx/util/typing.py @@ -122,7 +122,7 @@ def restify(cls: Optional[Type]) -> str: return ' | '.join(restify(a) for a in cls.__args__) elif cls.__module__ in ('__builtin__', 'builtins'): if hasattr(cls, '__args__'): - return ':class:`%s`\\[%s]' % (cls.__name__, ', '.join(restify(arg) for arg in cls.__args__)) + return ':class:`%s`\\ [%s]' % (cls.__name__, ', '.join(restify(arg) for arg in cls.__args__)) else: return ':class:`%s`' % cls.__name__ else: