mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
refactor(key_management): immutable types in preset transition helper for lint budgets
This commit is contained in:
parent
8a83f9e3cc
commit
4bfc6766e7
1 changed files with 3 additions and 3 deletions
|
|
@ -737,8 +737,8 @@ def _check_allowed_routes_caller_permission(
|
|||
|
||||
|
||||
def _is_safe_preset_route_transition(
|
||||
incoming_allowed_routes: list | None,
|
||||
existing_allowed_routes: list | None,
|
||||
incoming_allowed_routes: Sequence[str] | None,
|
||||
existing_allowed_routes: Sequence[str] | None,
|
||||
) -> bool:
|
||||
"""
|
||||
True when every route on BOTH sides is a safe `key_type` preset bucket
|
||||
|
|
@ -748,7 +748,7 @@ def _is_safe_preset_route_transition(
|
|||
"""
|
||||
return all(
|
||||
route in _NON_ADMIN_SAFE_ALLOWED_ROUTES_PRESETS
|
||||
for route in (*(incoming_allowed_routes or []), *(existing_allowed_routes or []))
|
||||
for route in (*(incoming_allowed_routes or ()), *(existing_allowed_routes or ()))
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue