diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-08-29 10:43:50 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-08-29 10:43:50 +0300 |
commit | 276f943610052d1d6d336b26dbc8823d48782f41 (patch) | |
tree | bc6f8b326b29b9f236092fed92de2821cf520de5 /sphinx/util | |
parent | adcda091d968d25e83a3c69c13388c667ff5edcb (diff) | |
parent | a0fbe2f7b7ed946ab29add70576986cdcac1abdd (diff) |
Merge branch '4.x' into 9564-fix_highlighted_code_role_smartquotes
Diffstat (limited to 'sphinx/util')
-rw-r--r-- | sphinx/util/typing.py | 2 |
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 |