mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-15 09:12:18 +00:00
style: ruff-format the delegation-ceiling block
The branch was cut before lint's ruff-format gate could run on this file (CI pre-filter failed on a missing local action, now merged in). Format the added block to match ruff==0.15.3.
This commit is contained in:
parent
1af6412f41
commit
0598ab698b
1 changed files with 3 additions and 11 deletions
|
|
@ -2884,13 +2884,8 @@ async def _validate_update_key_data(
|
|||
# one in the key's metadata still applies (it is added on top of
|
||||
# max_budget at request time by _update_key_budget_with_temp_budget_increase).
|
||||
_effective_temp_increase: float | None = data.temp_budget_increase
|
||||
if (
|
||||
_effective_temp_increase is None
|
||||
and existing_key_row.metadata is not None
|
||||
):
|
||||
_persisted_increase: Final = existing_key_row.metadata.get(
|
||||
"temp_budget_increase"
|
||||
)
|
||||
if _effective_temp_increase is None and existing_key_row.metadata is not None:
|
||||
_persisted_increase: Final = existing_key_row.metadata.get("temp_budget_increase")
|
||||
if _persisted_increase is not None:
|
||||
try:
|
||||
_persisted_expiry: Final = datetime.fromisoformat(
|
||||
|
|
@ -2906,10 +2901,7 @@ async def _validate_update_key_data(
|
|||
raise HTTPException(
|
||||
status_code=400,
|
||||
detail={
|
||||
"error": (
|
||||
f"temp_budget_increase must be a finite number. "
|
||||
f"Received: {_effective_temp_increase}"
|
||||
)
|
||||
"error": (f"temp_budget_increase must be a finite number. Received: {_effective_temp_increase}")
|
||||
},
|
||||
)
|
||||
# temp_budget_increase is applied on top of the key's max_budget at
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue