Compare commits

...

2 Commits

Author SHA1 Message Date
Travis Ralston
3d8d3305b2 Changelog 2024-07-09 12:11:58 -06:00
Travis Ralston
2617452444 Fix docs on record_action to clarify the actions are applied
This looks like a copy/paste error: the function doesn't reject anything, but instead allows the action count to go through regardless. The remainder of the function's documentation appears correct.
2024-07-09 12:10:53 -06:00
2 changed files with 3 additions and 3 deletions

1
changelog.d/17426.misc Normal file
View File

@@ -0,0 +1 @@
Fix documentation on `RateLimiter#record_action`.

View File

@@ -236,9 +236,8 @@ class Ratelimiter:
requester: The requester that is doing the action, if any.
key: An arbitrary key used to classify an action. Defaults to the
requester's user ID.
n_actions: The number of times the user wants to do this action. If the user
cannot do all of the actions, the user's action count is not incremented
at all.
n_actions: The number of times the user performed the action. May be negative
to "refund" the rate limit.
_time_now_s: The current time. Optional, defaults to the current time according
to self.clock. Only used by tests.
"""