mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
fix vtx linting
This commit is contained in:
parent
85184c7f82
commit
c89fad06e0
1 changed files with 5 additions and 1 deletions
|
|
@ -36,7 +36,7 @@ class VertexBase:
|
|||
self._credentials: Optional[GoogleCredentialsObject] = None
|
||||
self._credentials_project_mapping: Dict[
|
||||
Tuple[Optional[VERTEX_CREDENTIALS_TYPES], Optional[str]],
|
||||
GoogleCredentialsObject,
|
||||
Tuple[GoogleCredentialsObject, str],
|
||||
] = {}
|
||||
self.project_id: Optional[str] = None
|
||||
self.async_handler: Optional[AsyncHTTPHandler] = None
|
||||
|
|
@ -464,6 +464,10 @@ class VertexBase:
|
|||
credential_project_id,
|
||||
)
|
||||
|
||||
# Check if credentials are None before accessing attributes
|
||||
if _credentials is None:
|
||||
raise ValueError("Credentials are None after loading")
|
||||
|
||||
if _credentials.expired:
|
||||
verbose_logger.debug(
|
||||
f"Credentials expired, refreshing for project_id: {project_id}"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue