mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-01 02:02:20 +00:00
fix(compact_20260112): type object_type as Literal for mypy
This commit is contained in:
parent
fd5616f8ab
commit
8fb1852444
1 changed files with 6 additions and 2 deletions
|
|
@ -13,7 +13,7 @@ Mirrors Anthropic's native ``compact_20260112`` for non-Anthropic providers:
|
|||
"""
|
||||
|
||||
import re
|
||||
from typing import Any, Dict, List, Optional, Tuple, Union, cast
|
||||
from typing import Any, Dict, List, Literal, Optional, Tuple, Union, cast
|
||||
|
||||
import litellm
|
||||
from litellm._logging import verbose_logger
|
||||
|
|
@ -98,7 +98,11 @@ def _check_summary_model_access(
|
|||
team_model_aliases = getattr(user_api_key_auth, "team_model_aliases", None)
|
||||
team_models = list(getattr(user_api_key_auth, "team_models", None) or [])
|
||||
|
||||
for object_type, models in (("key", key_models), ("team", team_models)):
|
||||
checks: Tuple[Tuple[Literal["key", "team"], List[str]], ...] = (
|
||||
("key", key_models),
|
||||
("team", team_models),
|
||||
)
|
||||
for object_type, models in checks:
|
||||
if not models:
|
||||
continue
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue