Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #9589: autodoc: typing.Annotated has wrongly been rendered #9590

Merged
merged 1 commit into from
Aug 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGES
Expand Up @@ -18,8 +18,8 @@ Bugs fixed

* #9504: autodoc: generate incorrect reference to the parent class if the target
class inherites the class having ``_name`` attribute
* #9537: autodoc: Some objects under ``typing`` module are not displayed well
with the HEAD of 3.10
* #9537, #9589: autodoc: Some objects under ``typing`` module are not displayed
well with the HEAD of 3.10
* #9512: sphinx-build: crashed with the HEAD of Python 3.10

Testing
Expand Down
2 changes: 2 additions & 0 deletions sphinx/util/typing.py
Expand Up @@ -306,6 +306,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)):
return annotation.__qualname__
Expand Down