From 4f1a6b045cb8b1885dfe2bec98cf21fe4b6100a8 Mon Sep 17 00:00:00 2001 From: James Cahill Date: Thu, 9 Mar 2023 12:24:38 +0000 Subject: [PATCH] Adjust comment wording for is_exceeded --- xbox/webapi/common/ratelimits/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xbox/webapi/common/ratelimits/__init__.py b/xbox/webapi/common/ratelimits/__init__.py index 1fd2d3f..9e4e9ec 100644 --- a/xbox/webapi/common/ratelimits/__init__.py +++ b/xbox/webapi/common/ratelimits/__init__.py @@ -238,6 +238,8 @@ def get_limits_by_period(self, period: TimePeriod) -> List[SingleRateLimit]: def is_exceeded(self) -> bool: """ This function returns `True` if **any** rate limit has been exceeded. + + It behaves like an OR logic gate. """ # Map self.__limits to (limit).is_exceeded() @@ -264,5 +266,5 @@ def increment(self) -> IncrementResult: counter=results_sorted[ 0 ].counter, # Use the highest counter (sorted in descending order) - exceeded=self.is_exceeded(), # Call self.is_exceeded (True if any limit has been exceeded, a-la an OR gate.) + exceeded=self.is_exceeded(), # Call self.is_exceeded (True if any limit has been exceeded, like an OR gate.) )