Skip to content

Commit

Permalink
Fix #9404: autodoc: autoclass raises TypeError for dict-like object
Browse files Browse the repository at this point in the history
The autoclass directive raises TypeError when dict-like object (not a
class) is given as a subject.
  • Loading branch information
tk0miya committed Jul 10, 2021
1 parent ac2b9a4 commit fe03723
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES
Expand Up @@ -90,6 +90,8 @@ Bugs fixed
* #9364: autodoc: single element tuple on the default argument value is wrongly
rendered
* #9362: autodoc: AttributeError is raised on processing a subclass of Tuple[()]
* #9404: autodoc: TypeError is raised on processing dict-like object (not a
class) via autoclass directive
* #9317: html: Pushing left key causes visiting the next page at the first page
* #9381: html: URL for html_favicon and html_log does not work
* #9270: html theme : pyramid theme generates incorrect logo links
Expand Down
2 changes: 1 addition & 1 deletion sphinx/util/typing.py
Expand Up @@ -127,7 +127,7 @@ def restify(cls: Optional[Type]) -> str:
return _restify_py37(cls)
else:
return _restify_py36(cls)
except AttributeError:
except (AttributeError, TypeError):
return repr(cls)


Expand Down

0 comments on commit fe03723

Please sign in to comment.