We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 694fe09 commit 8ef64cdCopy full SHA for 8ef64cd
pywebio/platform/page.py
@@ -336,9 +336,9 @@ def __init__(self):
336
def __call__(self, func):
337
self.called = True
338
339
- @functools.wraps(func)
340
- def wrapper(*args, **kwargs):
341
- return func(*args, **kwargs)
+ func_copy = functools.partial(func) # to make a copy of the function
+ # to keep the original function name and docstring
+ wrapper = functools.wraps(func)(func_copy)
342
343
try:
344
for key, val in configs.items():
@@ -355,4 +355,4 @@ def __del__(self): # if not called as decorator, set the config to global
355
global _global_config
356
_global_config = configs
357
358
- return Decorator()
+ return Decorator()
0 commit comments