mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-29 01:42:19 +00:00
fix(proxy): drop Final annotation inside loop for pyright
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
d842aa3b25
commit
4d5f87aad7
1 changed files with 4 additions and 2 deletions
|
|
@ -3167,13 +3167,15 @@ class _PROXY_MaxParallelRequestsHandler_v3(CustomLogger):
|
|||
for status in response["statuses"]:
|
||||
if status["code"] == "OVER_LIMIT":
|
||||
descriptor_key = status["descriptor_key"]
|
||||
status_value: Final = status.get("descriptor_value")
|
||||
matching_descriptor = next(
|
||||
(
|
||||
desc
|
||||
for desc in descriptors
|
||||
if desc["key"] == descriptor_key
|
||||
and (status_value is None or desc["value"] == status_value)
|
||||
and (
|
||||
(status_value := status.get("descriptor_value")) is None
|
||||
or desc["value"] == status_value
|
||||
)
|
||||
),
|
||||
None,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue