commit | 776b56ccd13c45e9eda0a67e8c9f42e65acb3135 | [log] [tgz] |
---|---|---|
author | Sagar Vora <sagar@resilient.tech> | Tue Apr 04 19:24:07 2023 +0530 |
committer | Sagar Vora <sagar@resilient.tech> | Thu Apr 20 05:17:30 2023 -0700 |
tree | fc0e126c94981c404a92afafbfa75c50d6c74b68 | |
parent | 2fa641f86de8ad0be5f39575726d3672bfd885d4 [diff] |
fix: use `functools.wraps` to preserve doc signature
diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 5ccb1b9..c9c9c9c 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py
@@ -1,3 +1,4 @@ +import functools import inspect import frappe @@ -138,6 +139,7 @@ def myfunction(): pass""" + @functools.wraps(fn) def caller(*args, **kwargs): overrides = frappe.get_hooks("regional_overrides", {}).get(get_region()) function_path = f"{inspect.getmodule(fn).__name__}.{fn.__name__}"