mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-12 08:42:18 +00:00
fix(model_access_group): satisfy LIT type discipline rules for updated_dict and updated_pairs
This commit is contained in:
parent
506f4011bb
commit
a652d35127
1 changed files with 4 additions and 4 deletions
|
|
@ -661,7 +661,7 @@ async def create_model_group(
|
|||
)
|
||||
|
||||
# Update deployments using provided model_ids and/or model_names
|
||||
updated_dict: dict[str, str] = {}
|
||||
updated_dict: Final[dict[str, str]] = {} # mutable-ok: accumulator for unique deployment updates
|
||||
if has_model_ids:
|
||||
assert data.model_ids is not None
|
||||
for pair in await update_specific_deployments_with_access_group(
|
||||
|
|
@ -680,7 +680,7 @@ async def create_model_group(
|
|||
):
|
||||
updated_dict[pair[0]] = pair[1]
|
||||
|
||||
updated_pairs = list(updated_dict.items())
|
||||
updated_pairs: Final = list(updated_dict.items())
|
||||
models_updated: Final = len(updated_pairs)
|
||||
|
||||
live_before_reload: Final = live_model_ids_snapshot()
|
||||
|
|
@ -928,7 +928,7 @@ async def update_access_group(
|
|||
stripped_pairs: Final = tuple(pair for pair in stripped if pair is not None)
|
||||
|
||||
# Step 2: Add access group using provided model_ids and/or model_names
|
||||
updated_dict: dict[str, str] = {}
|
||||
updated_dict: Final[dict[str, str]] = {} # mutable-ok: accumulator for unique deployment updates
|
||||
if has_model_ids:
|
||||
assert data.model_ids is not None
|
||||
for pair in await update_specific_deployments_with_access_group(
|
||||
|
|
@ -947,7 +947,7 @@ async def update_access_group(
|
|||
):
|
||||
updated_dict[pair[0]] = pair[1]
|
||||
|
||||
updated_pairs = list(updated_dict.items())
|
||||
updated_pairs: Final = list(updated_dict.items())
|
||||
models_updated: Final = len(updated_pairs)
|
||||
|
||||
# Clear cache and reload models to pick up the access group changes
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue