Copy properties to decorator
Use functools.wraps() to copy the docstring and name from the decorated function to the closure so the autodoc code gets the right values.
This commit is contained in:
parent
6af9b92878
commit
bd36dc2f35
@ -1,5 +1,6 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
import functools
|
||||
import inspect
|
||||
import sys
|
||||
|
||||
@ -57,6 +58,7 @@ def wsexpose(*args, **kwargs):
|
||||
funcdef = wsme.api.FunctionDefinition.get(f)
|
||||
funcdef.resolve_types(wsme.types.registry)
|
||||
|
||||
@functools.wraps(f)
|
||||
def callfunction(self, *args, **kwargs):
|
||||
try:
|
||||
args, kwargs = wsme.rest.args.get_args(
|
||||
|
Loading…
x
Reference in New Issue
Block a user