mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
style(rate-limiting): fix a LIT010 rebind the base's ratcheted-down budget now flags
configured_limit/tag_value were rebound via unpacking after already being bound by an earlier for-loop over the same atomic_checks sequence; only the first unpacking binding of a name is exempt from requiring Final. Renamed to failing_limit/failing_tag_value, and used the literal `_` placeholder (the only underscore-prefixed name this gate's Final-exemption recognizes) for the discarded third element instead of reusing `_key`.
This commit is contained in:
parent
66def53981
commit
69004900b1
1 changed files with 2 additions and 2 deletions
|
|
@ -975,8 +975,8 @@ class _PROXY_TagRateLimiter( # pyright: ignore[reportUnusedClass] # only refer
|
|||
)
|
||||
)
|
||||
if failing_index is not None:
|
||||
configured_limit, tag_value, _key = atomic_checks[failing_index]
|
||||
self._raise_over_limit(configured_limit, tag_value, model, current=values[0])
|
||||
failing_limit, failing_tag_value, _ = atomic_checks[failing_index]
|
||||
self._raise_over_limit(failing_limit, failing_tag_value, model, current=values[0])
|
||||
|
||||
concurrency_reservations: Final = tuple(
|
||||
(key, _partition_key(configured_limit.entry))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue