Skip to content

Commit

Permalink
fix: use functools.wraps to preserve doc signature
Browse files Browse the repository at this point in the history
(cherry picked from commit 776b56c)
  • Loading branch information
sagarvora authored and mergify[bot] committed Apr 20, 2023
1 parent 87595bd commit 2ec18eb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions erpnext/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import functools
import inspect

import frappe
Expand Down Expand Up @@ -138,6 +139,7 @@ def allow_regional(fn):
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__}"
Expand Down

0 comments on commit 2ec18eb

Please sign in to comment.