Skip to content

Commit

Permalink
Adjust comment wording for is_exceeded
Browse files Browse the repository at this point in the history
  • Loading branch information
jcxldn committed Mar 9, 2023
1 parent 131c913 commit 4f1a6b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion xbox/webapi/common/ratelimits/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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.)
)

0 comments on commit 4f1a6b0

Please sign in to comment.