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:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2021-08-29 10:43:50 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2021-08-29 10:43:50 +0300
commit276f943610052d1d6d336b26dbc8823d48782f41 (patch)
treebc6f8b326b29b9f236092fed92de2821cf520de5 /sphinx/util
parentadcda091d968d25e83a3c69c13388c667ff5edcb (diff)
parenta0fbe2f7b7ed946ab29add70576986cdcac1abdd (diff)
Merge branch '4.x' into 9564-fix_highlighted_code_role_smartquotes
Diffstat (limited to 'sphinx/util')
-rw-r--r--sphinx/util/typing.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/sphinx/util/typing.py b/sphinx/util/typing.py
index 78b0b5b0a..cf4318cda 100644
--- a/sphinx/util/typing.py
+++ b/sphinx/util/typing.py
@@ -315,6 +315,8 @@ def stringify(annotation: Any) -> str:
return 'None'
elif annotation in INVALID_BUILTIN_CLASSES:
return INVALID_BUILTIN_CLASSES[annotation]
+ elif str(annotation).startswith('typing.Annotated'): # for py310+
+ pass
elif (getattr(annotation, '__module__', None) == 'builtins' and
getattr(annotation, '__qualname__', None)):
if hasattr(annotation, '__args__'): # PEP 585 generic