From 4ac93b7d922ca62a6e7c48a1d061ea834ad67bb3 Mon Sep 17 00:00:00 2001 From: "Joshua A. Anderson" Date: Tue, 18 Jun 2024 22:08:14 -0400 Subject: [PATCH] Fix "Failed to get a function signature" sphinx warnings. functools.wraps does not handle properties correctly. Manually copy over the docstring. --- hoomd/custom/custom_operation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hoomd/custom/custom_operation.py b/hoomd/custom/custom_operation.py index fc53244105..e1eadd68d0 100644 --- a/hoomd/custom/custom_operation.py +++ b/hoomd/custom/custom_operation.py @@ -143,7 +143,6 @@ def _wrap_loggable(name, mthd): if isinstance(mthd, property): @property - @functools.wraps(mthd) def getter(self): return getattr(self._action, name) @@ -153,6 +152,7 @@ def getter(self): def setter(self, new_value): setattr(self._action, name, new_value) + getter.__doc__ = mthd.__doc__ return getter @functools.wraps(mthd)