Skip to content

Commit 4f1a6b0

Browse files
committed
Adjust comment wording for is_exceeded
1 parent 131c913 commit 4f1a6b0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

xbox/webapi/common/ratelimits/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,8 @@ def get_limits_by_period(self, period: TimePeriod) -> List[SingleRateLimit]:
238238
def is_exceeded(self) -> bool:
239239
"""
240240
This function returns `True` if **any** rate limit has been exceeded.
241+
242+
It behaves like an OR logic gate.
241243
"""
242244

243245
# Map self.__limits to (limit).is_exceeded()
@@ -264,5 +266,5 @@ def increment(self) -> IncrementResult:
264266
counter=results_sorted[
265267
0
266268
].counter, # Use the highest counter (sorted in descending order)
267-
exceeded=self.is_exceeded(), # Call self.is_exceeded (True if any limit has been exceeded, a-la an OR gate.)
269+
exceeded=self.is_exceeded(), # Call self.is_exceeded (True if any limit has been exceeded, like an OR gate.)
268270
)

0 commit comments

Comments
 (0)