mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-12 23:01:41 +00:00
fix: resolve MyPy type errors blocking CI
This commit is contained in:
parent
8914ec8ea5
commit
607a5d7d95
2 changed files with 3 additions and 2 deletions
|
|
@ -118,7 +118,7 @@ def _generate_gcp_iam_access_token(service_account: str) -> str:
|
|||
Access token string for GCP IAM authentication
|
||||
"""
|
||||
try:
|
||||
from google.cloud import iam_credentials_v1
|
||||
from google.cloud import iam_credentials_v1 # type: ignore
|
||||
except ImportError:
|
||||
raise ImportError(
|
||||
"google-cloud-iam is required for GCP IAM Redis authentication. "
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ from typing import (
|
|||
TYPE_CHECKING,
|
||||
Any,
|
||||
AsyncGenerator,
|
||||
Dict,
|
||||
List,
|
||||
Literal,
|
||||
Optional,
|
||||
|
|
@ -757,7 +758,7 @@ class ModelArmorGuardrail(CustomGuardrail, VertexBase):
|
|||
)
|
||||
error_value = detail.get("error", detail)
|
||||
if isinstance(error_value, dict):
|
||||
error_obj = dict(error_value)
|
||||
error_obj: Dict[str, Any] = dict(error_value)
|
||||
else:
|
||||
error_obj = {"message": str(error_value)}
|
||||
error_obj["code"] = str(e.status_code)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue