File tree Expand file tree Collapse file tree
pydantic_settings/sources/providers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,7 +30,10 @@ def import_gcp_secret_manager() -> None:
3030 try :
3131 from google .auth import default as google_auth_default
3232 from google .auth .credentials import Credentials
33- from google .cloud .secretmanager import SecretManagerServiceClient
33+
34+ with warnings .catch_warnings ():
35+ warnings .filterwarnings ('ignore' , category = FutureWarning )
36+ from google .cloud .secretmanager import SecretManagerServiceClient
3437 except ImportError as e : # pragma: no cover
3538 raise ImportError (
3639 'GCP Secret Manager dependencies are not installed, run `pip install pydantic-settings[gcp-secret-manager]`'
@@ -149,7 +152,7 @@ def __init__(
149152 # If credentials or project_id are not passed, then
150153 # try to get them from the default function
151154 if not credentials or not project_id :
152- _creds , _project_id = google_auth_default () # type: ignore[no-untyped-call]
155+ _creds , _project_id = google_auth_default ()
153156
154157 # Set the credentials and/or project id if they weren't specified
155158 if credentials is None :
You can’t perform that action at this time.
0 commit comments