Propagate the docstring of the wrapped function when using an @action annotation

This commit is contained in:
Fabio Manganiello 2018-07-16 22:56:07 +02:00
parent 0e85bf8fcd
commit 2888cb3a4b
2 changed files with 3 additions and 2 deletions

@ -1 +1 @@
Subproject commit 1f91df553c5c5beeffc4745f50b6535cbc76c7a8
Subproject commit 0cd1054524f80cc635cab7a2c0e67632bbb877b8

View File

@ -6,7 +6,6 @@ from platypush.config import Config
from platypush.message.response import Response
from platypush.utils import get_decorators
def action(f):
def _execute_action(*args, **kwargs):
output = None
@ -24,6 +23,8 @@ def action(f):
return Response(output=output, errors=errors)
# Propagate the docstring
_execute_action.__doc__ = f.__doc__
return _execute_action