Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Commit a5a06d6

Browse files
committed
updated ads templates
1 parent ada81f1 commit a5a06d6

File tree

1 file changed

+4
-5
lines changed
  • gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/transports

1 file changed

+4
-5
lines changed

gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/transports/base.py.j2

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ class {{ service.name }}Transport(abc.ABC):
9898
host += ':443'
9999
self._host = host
100100

101-
scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES}
102-
103101
# Save the scopes.
104102
self._scopes = scopes
105103

@@ -114,11 +112,12 @@ class {{ service.name }}Transport(abc.ABC):
114112
if credentials_file is not None:
115113
credentials, _ = google.auth.load_credentials_from_file(
116114
credentials_file,
117-
**scopes_kwargs,
118-
quota_project_id=quota_project_id
115+
scopes=scopes,
116+
quota_project_id=quota_project_id,
117+
default_scopes=self.AUTH_SCOPES,
119118
)
120119
elif credentials is None and not self._ignore_credentials:
121-
credentials, _ = google.auth.default(**scopes_kwargs, quota_project_id=quota_project_id)
120+
credentials, _ = google.auth.default(scopes=scopes, quota_project_id=quota_project_id, default_scopes=self.AUTH_SCOPES)
122121

123122
# If the credentials are service account credentials, then always try to use self signed JWT.
124123
if always_use_jwt_access and isinstance(credentials, service_account.Credentials) and hasattr(service_account.Credentials, "with_always_use_jwt_access"):

0 commit comments

Comments
 (0)