We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3729600 commit eed421bCopy full SHA for eed421b
xbox/webapi/common/ratelimits/__init__.py
@@ -271,11 +271,7 @@ def increment(self) -> IncrementResult:
271
result = limit.increment()
272
results.append(result)
273
274
- # SPEC: Which counter should be picked here?
275
- # For now, let's pick the *higher* counter
276
- # (should incrementResult even include the counter?)
277
- results[1].counter = 5
278
-
+ # SPEC: Let's pick the *higher* counter
279
# By default, sorted() returns in ascending order, so let's set reverse=True
280
# This means that the result with the highest counter will be the first element.
281
results_sorted = sorted(results, key=lambda i: i.counter, reverse=True)
0 commit comments