Skip to content

Commit

Permalink
require decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
dae committed Jul 17, 2017
1 parent dffab13 commit 9df1947
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions anki/hooks.py
Expand Up @@ -13,13 +13,7 @@
automatically but can be called with _old().
"""

import functools

try:
# optional: like functools.wraps, but signature-preserving
import decorator
except ImportError:
decorator = None
import decorator

# Hooks
##############################################################################
Expand Down Expand Up @@ -68,9 +62,6 @@ def repl(*args, **kwargs):
else:
return new(_old=old, *args, **kwargs)

if decorator is None:
return functools.wraps(repl)

def decorator_wrapper(f, *args, **kwargs):
return repl(*args, **kwargs)

Expand Down

0 comments on commit 9df1947

Please sign in to comment.