I am attempting to use Sphinx to document my Python class. I do so using autodoc:
.. autoclass:: Bus
:members:
While it correctly fetches the docstrings for my methods, those that are decorated:
@checkStale
def open(self):
"""
Some docs.
"""
# Code
with @checkStale
being
def checkStale(f):
@wraps(f)
def newf(self, *args, **kwargs):
if self._stale:
raise Exception
return f(self, *args, **kwargs)
return newf
have an incorrect prototype, such as open(*args, **kwargs)
.
How can I fix this? I was under the impression that using @wraps
would fix up this kind of thing.