fix: use functools.wraps to preserve doc signature
(cherry picked from commit 776b56ccd1)
This commit is contained in:
@@ -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__}"
|
||||||
|
|||||||
Reference in New Issue
Block a user