diff --git a/src/galois/_helper.py b/src/galois/_helper.py index 0e15d0bd5..2c31c8675 100644 --- a/src/galois/_helper.py +++ b/src/galois/_helper.py @@ -108,6 +108,8 @@ def extend_docstring(method, replace=None, docstring=""): def decorator(obj): parent_docstring = getattr(method, "__doc__", "") + if parent_docstring is None: + return obj for from_str, to_str in replace.items(): parent_docstring = parent_docstring.replace(from_str, to_str) obj.__doc__ = parent_docstring + "\n" + docstring