File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ Bugs fixed
1818
1919* #8559: autodoc: AttributeError is raised when using forward-reference type
2020 annotations
21+ * #8568: autodoc: TypeError is raised on checking slots attribute
2122
2223Testing
2324--------
Original file line number Diff line number Diff line change @@ -2114,7 +2114,7 @@ def isslotsattribute(self) -> bool:
21142114 return True
21152115 else :
21162116 return False
2117- except (AttributeError , ValueError ):
2117+ except (AttributeError , ValueError , TypeError ):
21182118 return False
21192119
21202120 def import_object (self , raiseerror : bool = False ) -> bool :
Original file line number Diff line number Diff line change @@ -187,6 +187,7 @@ def getslots(obj: Any) -> Optional[Dict]:
187187
188188 Return None if gienv *obj* does not have __slots__.
189189 Raises AttributeError if given *obj* raises an error on accessing __slots__.
190+ Raises TypeError if given *obj* is not a class.
190191 Raises ValueError if given *obj* have invalid __slots__.
191192 """
192193 if not inspect .isclass (obj ):
You can’t perform that action at this time.
0 commit comments