diff --git a/anki/hooks.py b/anki/hooks.py index f29e75003..78b613402 100644 --- a/anki/hooks.py +++ b/anki/hooks.py @@ -13,13 +13,7 @@ If you call wrap() with pos='around', the original function will not be called 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 ############################################################################## @@ -68,9 +62,6 @@ def wrap(old, new, pos="after"): 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)