Parcourir la source

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

Ask Solem il y a 15 ans
Parent
commit
6774f31a7b
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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)