We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
sphinx.util.inspect
1 parent 6730392 commit e352a67Copy full SHA for e352a67
sphinx/ext/autodoc/__init__.py
@@ -2438,8 +2438,8 @@ def get_doc(self) -> list[list[str]] | None:
2438
if self.object is SLOTSATTR:
2439
try:
2440
parent___slots__ = inspect.getslots(self.parent)
2441
- if parent___slots__ and parent___slots__.get(self.objpath[-1]):
2442
- docstring = prepare_docstring(parent___slots__[self.objpath[-1]])
+ if parent___slots__ and (docstring := parent___slots__.get(self.objpath[-1])):
+ docstring = prepare_docstring(docstring)
2443
return [docstring]
2444
else:
2445
return []
0 commit comments