I am using sphinx to document a project and am having problems with functions wrapped in decorators. I have seen similar questions asked but no solution seems to fit my problem
I have hundreds of functions all wrapped in a custom decorator that itself can accept parameters
from functools import wraps
def CustomFunctionDecorator(id, name):
"""Custom decorator"""
def outer(f):
@wraps(f)
def inner(*args, **kwargs):
...do stuff....
f(*args, **kwargs)
return inner
return outer
My function will then look like this
@CustomFunctionDecorator(123, 'Test')
def TestFunction(a, b, c=None):
"""Test Documentation"""
..do something....
Now when i use sphinx and autodoc to generate my documentation, all of my functions wrapped in the CustomFunctionDecorator hide the actual arguments of the function in the sphinx documentation and appear like this
TestFunction(*args, **kwargs)
Test Documentation
The documentation works, but the function parameters don't....
Any ideas? hope i made myself clear