Skip to content

Commit

Permalink
docs: Warn about caveats of @utils.serializable
Browse files Browse the repository at this point in the history
  • Loading branch information
adigitoleo committed Jun 6, 2024
1 parent 408e677 commit 214c308
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/pydrex/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,12 @@ def __call__(self, *args, **kwargs):


def serializable(f):
"""Make decorated function serializable."""
"""Make decorated function serializable.
.. warning:: The decorated function cannot be a method, and it will loose it's
docstring. It is not possible to use `functools.wraps` to mitigate this.
"""
return SerializedCallable(f)


Expand Down

0 comments on commit 214c308

Please sign in to comment.