提交 8d2a0845 authored 作者: --global's avatar --global

Make sure change_flags decorator leaves the decorated function's name unchanged

上级 00c376dd
......@@ -116,6 +116,10 @@ def change_flags(**kwargs):
if v.fullname == k]
assert len(l) == 1
l[0].__set__(None, old_val[k])
# Make sure that the name of the decorated function remains the same.
inner.__name__ = f.__name__
return inner
return change_flags_exec
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论