rate_limit: Remove inaccurate docstring on clear_history methods.

This commit is contained in:
Mateusz Mandera
2020-03-06 13:58:23 +01:00
committed by Tim Abbott
parent b9e5103d0c
commit 27c19b081b

View File

@@ -67,10 +67,6 @@ class RateLimitedObject(ABC):
self.backend.unblock_access(self.key()) self.backend.unblock_access(self.key())
def clear_history(self) -> None: def clear_history(self) -> None:
'''
This is only used by test code now, where it's very helpful in
allowing us to run tests quickly, by giving a user a clean slate.
'''
self.backend.clear_history(self.key()) self.backend.clear_history(self.key())
def max_api_calls(self) -> int: def max_api_calls(self) -> int:
@@ -149,10 +145,7 @@ class RateLimiterBackend(ABC):
@classmethod @classmethod
@abstractmethod @abstractmethod
def clear_history(cls, entity_key: str) -> None: def clear_history(cls, entity_key: str) -> None:
''' pass
This is only used by test code now, where it's very helpful in
allowing us to run tests quickly, by giving a user a clean slate.
'''
@classmethod @classmethod
@abstractmethod @abstractmethod
@@ -189,10 +182,6 @@ class RedisRateLimiterBackend(RateLimiterBackend):
@classmethod @classmethod
def clear_history(cls, entity_key: str) -> None: def clear_history(cls, entity_key: str) -> None:
'''
This is only used by test code now, where it's very helpful in
allowing us to run tests quickly, by giving a user a clean slate.
'''
for key in cls.get_keys(entity_key): for key in cls.get_keys(entity_key):
client.delete(key) client.delete(key)