Skip to content

Commit

Permalink
BUG: Fix inspect.get_doc() returning None (vs. '' before) on Py3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
kernc committed Feb 6, 2025
1 parent da45e73 commit bcdf433
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pdoc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,8 @@ def definition_order_index(
name, self.module,
docstring=(
var_docstrings.get(name) or
(inspect.isclass(obj) or _is_descriptor(obj)) and inspect.getdoc(obj)),
(inspect.isclass(obj) or _is_descriptor(obj)) and inspect.getdoc(obj) or
''), # inspect.getdoc() may return None on CPython 3.13
cls=self,
kind="prop" if isinstance(obj, property) else "var",
obj=_is_descriptor(obj) and obj or None,
Expand Down

0 comments on commit bcdf433

Please sign in to comment.