We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 810a1e2 commit 31e07c7Copy full SHA for 31e07c7
sphinx/util/typing.py
@@ -310,6 +310,8 @@ def stringify(annotation: Any) -> str:
310
return INVALID_BUILTIN_CLASSES[annotation]
311
elif (getattr(annotation, '__module__', None) == 'builtins' and
312
hasattr(annotation, '__qualname__')):
313
+ if hasattr(annotation, '__args__'): # PEP 585 generic
314
+ return repr(annotation)
315
return annotation.__qualname__
316
elif annotation is Ellipsis:
317
return '...'
0 commit comments