From 2888cb3a4b644dcdbdb33c68e34f030c1f98d643 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Mon, 16 Jul 2018 22:56:07 +0200 Subject: [PATCH] Propagate the docstring of the wrapped function when using an @action annotation --- docs/wiki | 2 +- platypush/plugins/__init__.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/wiki b/docs/wiki index 1f91df553c..0cd1054524 160000 --- a/docs/wiki +++ b/docs/wiki @@ -1 +1 @@ -Subproject commit 1f91df553c5c5beeffc4745f50b6535cbc76c7a8 +Subproject commit 0cd1054524f80cc635cab7a2c0e67632bbb877b8 diff --git a/platypush/plugins/__init__.py b/platypush/plugins/__init__.py index 0a80819115..e424f67d6d 100644 --- a/platypush/plugins/__init__.py +++ b/platypush/plugins/__init__.py @@ -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