mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Match formatting of other recursive types
This commit is contained in:
parent
a30f2b99c3
commit
d480447cc6
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user