fix: use functools.wraps to preserve doc signature
This commit is contained in:
parent
2fa641f86d
commit
776b56ccd1
@ -1,3 +1,4 @@
|
|||||||
|
import functools
|
||||||
import inspect
|
import inspect
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
@ -138,6 +139,7 @@ def allow_regional(fn):
|
|||||||
def myfunction():
|
def myfunction():
|
||||||
pass"""
|
pass"""
|
||||||
|
|
||||||
|
@functools.wraps(fn)
|
||||||
def caller(*args, **kwargs):
|
def caller(*args, **kwargs):
|
||||||
overrides = frappe.get_hooks("regional_overrides", {}).get(get_region())
|
overrides = frappe.get_hooks("regional_overrides", {}).get(get_region())
|
||||||
function_path = f"{inspect.getmodule(fn).__name__}.{fn.__name__}"
|
function_path = f"{inspect.getmodule(fn).__name__}.{fn.__name__}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user