Skip to content

Commit

Permalink
Minor restructuring, added back debugging statement
Browse files Browse the repository at this point in the history
  • Loading branch information
ZiadAmerr committed Aug 15, 2023
1 parent 823a89d commit 0b295fc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ivy/func_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,15 @@ def decorate(decorator_lookup):
decorator_lookup : dict
The lookup table of frozen sets of function names to decorators list
"""

def _decorate(fn):
decorators = get_decorators(fn.__name__, decorator_lookup=decorator_lookup)

@functools.wraps(fn)
def wrap(*args, **kwargs):
nonlocal fn
decorators = get_decorators(fn.__name__, decorator_lookup=decorator_lookup)
for decorator in reversed(decorators):
# print("decorating with {}".format(decorator.__name__))
fn = decorator(fn)
return fn(*args, **kwargs)
return wrap
Expand Down

0 comments on commit 0b295fc

Please sign in to comment.