Skip to content

Commit beea084

Browse files
authored
Merge pull request #9411 from tk0miya/9404_TypeError_for_non_class
Fix #9404: autodoc: autoclass raises TypeError for dict-like object
2 parents ac2b9a4 + fe03723 commit beea084

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ Bugs fixed
9090
* #9364: autodoc: single element tuple on the default argument value is wrongly
9191
rendered
9292
* #9362: autodoc: AttributeError is raised on processing a subclass of Tuple[()]
93+
* #9404: autodoc: TypeError is raised on processing dict-like object (not a
94+
class) via autoclass directive
9395
* #9317: html: Pushing left key causes visiting the next page at the first page
9496
* #9381: html: URL for html_favicon and html_log does not work
9597
* #9270: html theme : pyramid theme generates incorrect logo links

sphinx/util/typing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def restify(cls: Optional[Type]) -> str:
127127
return _restify_py37(cls)
128128
else:
129129
return _restify_py36(cls)
130-
except AttributeError:
130+
except (AttributeError, TypeError):
131131
return repr(cls)
132132

133133

0 commit comments

Comments
 (0)