Skip to content

Commit 12249cc

Browse files
author
Ammon Smith
committed
Change to decorator factory.
1 parent 7a92e4f commit 12249cc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

duckduckgo/query.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818
try:
1919
from ratelimit import rate_limited
2020
except ImportError:
21-
def rate_limited(func, freq=None, mult=None):
22-
return func
21+
def rate_limited(freq=None, mult=None):
22+
def decorator(func):
23+
return func
24+
return decorator
2325

2426
DEFAULT_USER_AGENT = f'python-duckduckgo {__version__}'
2527
DEFAULT_PRIORITIES = ('answer', 'abstract', 'related.0', 'definition')

0 commit comments

Comments
 (0)