Skip to content

Commit

Permalink
DX: allow appending to empty docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed May 20, 2024
1 parent 1b4612c commit cbc82be
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/_extend_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,8 +720,10 @@ def _create_latex_doit_definition(expr: sp.Expr, deep: bool = False) -> str:


def _append_to_docstring(class_type: Callable | type, appended_text: str) -> None:
assert class_type.__doc__ is not None
class_type.__doc__ += appended_text
if class_type.__doc__ is None:
class_type.__doc__ = appended_text
else:
class_type.__doc__ += appended_text


def __generate_transitions_cached(
Expand Down

0 comments on commit cbc82be

Please sign in to comment.