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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user