From 074a57654ac98bcbc1d2d4e3904eecf064589cd4 Mon Sep 17 00:00:00 2001 From: euri10 Date: Mon, 21 Jun 2021 10:03:09 +0200 Subject: [PATCH] Leftovers --- ratelimit/backends/slidingredis.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/ratelimit/backends/slidingredis.py b/ratelimit/backends/slidingredis.py index d886603..2752631 100644 --- a/ratelimit/backends/slidingredis.py +++ b/ratelimit/backends/slidingredis.py @@ -76,13 +76,6 @@ async def retry_after(self, path: str, user: str, rule: Rule) -> bool: block_time = await self.is_blocking(user) if block_time > 0: return block_time - # if await self.is_blocking(user): - # assert rule.block_time - # return False, { - # "expire_in": [rule.block_time], - # "scores": [], - # "epoch": time.time(), - # } limits = await self.get_limits(path, user, rule) retry_after = limits["expire_in"][0] if not all(limits["scores"]) else 0