Explorar o código

task decorators: Don't save docstring to cls.run.__doc__ (but cls.__doc__ only)

Ask Solem %!s(int64=15) %!d(string=hai) anos
pai
achega
6774f31a7b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      celery/decorators.py

+ 1 - 1
celery/decorators.py

@@ -47,7 +47,7 @@ def task(*args, **options):
         def _create_task_cls(fun):
             base = options.pop("base", Task)
 
-            @wraps(fun)
+            @wraps(fun, assigned=("__module__", "__name__"))
             def run(self, *args, **kwargs):
                 return fun(*args, **kwargs)