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

Commit a7674f0

Browse files
committed
chore(types): fix typing for transport scopes
1 parent d20dd28 commit a7674f0

File tree

1 file changed

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

1 file changed

+4
-5
lines changed

gapic/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
@@ -108,8 +108,6 @@ class {{ service.name }}Transport(abc.ABC):
108108
self._extended_operations_services: Dict[str, Any] = {}
109109
{% endif %}
110110

111-
scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES}
112-
113111
# Save the scopes.
114112
self._scopes = scopes
115113
if not hasattr(self, "_ignore_credentials"):
@@ -123,11 +121,12 @@ class {{ service.name }}Transport(abc.ABC):
123121
if credentials_file is not None:
124122
credentials, _ = google.auth.load_credentials_from_file(
125123
credentials_file,
126-
**scopes_kwargs,
127-
quota_project_id=quota_project_id
124+
scopes=scopes,
125+
quota_project_id=quota_project_id,
126+
default_scopes=self.AUTH_SCOPES,
128127
)
129128
elif credentials is None and not self._ignore_credentials:
130-
credentials, _ = google.auth.default(**scopes_kwargs, quota_project_id=quota_project_id)
129+
credentials, _ = google.auth.default(scopes=scopes, quota_project_id=quota_project_id, default_scopes=self.AUTH_SCOPES)
131130
# Don't apply audience if the credentials file passed from user.
132131
if hasattr(credentials, "with_gdch_audience"):
133132
credentials = credentials.with_gdch_audience(api_audience if api_audience else host)

0 commit comments

Comments
 (0)