Skip to content

Commit eed421b

Browse files
committed
Don't overwrite results[1].counter
Likely a change made while developing that I forgot to remove.
1 parent 3729600 commit eed421b

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

xbox/webapi/common/ratelimits/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,7 @@ def increment(self) -> IncrementResult:
271271
result = limit.increment()
272272
results.append(result)
273273

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-
274+
# SPEC: Let's pick the *higher* counter
279275
# By default, sorted() returns in ascending order, so let's set reverse=True
280276
# This means that the result with the highest counter will be the first element.
281277
results_sorted = sorted(results, key=lambda i: i.counter, reverse=True)

0 commit comments

Comments
 (0)