Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make config decorator keep original function's __name__ #654

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pywebio/platform/page.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
import urllib.parse
from collections import namedtuple
from collections.abc import Mapping, Sequence
from functools import lru_cache
from functools import partial
from functools import lru_cache, partial
from os import path, environ

from tornado import template
Expand Down Expand Up @@ -341,6 +340,7 @@ def __call__(self, func):
for key, val in configs.items():
if val:
setattr(func, '_pywebio_%s' % key, val)
func.__name__ = func.func.__name__
except Exception:
pass
return func
Expand Down