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

Commit 20b8f71

Browse files
authored
chore: remove trailing whitespace (#816)
1 parent 852748a commit 20b8f71

4 files changed

Lines changed: 25 additions & 25 deletions

File tree

gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/base.py.j2

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class {{ service.name }}Transport(abc.ABC):
5151
scopes: typing.Optional[typing.Sequence[str]] = AUTH_SCOPES,
5252
quota_project_id: typing.Optional[str] = None,
5353
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
54-
**kwargs,
54+
**kwargs,
5555
) -> None:
5656
"""Instantiate the transport.
5757

@@ -69,10 +69,10 @@ class {{ service.name }}Transport(abc.ABC):
6969
scope (Optional[Sequence[str]]): A list of scopes.
7070
quota_project_id (Optional[str]): An optional project to use for billing
7171
and quota.
72-
client_info (google.api_core.gapic_v1.client_info.ClientInfo):
73-
The client info used to send a user-agent string along with
74-
API requests. If ``None``, then default info will be used.
75-
Generally, you only need to set this if you're developing
72+
client_info (google.api_core.gapic_v1.client_info.ClientInfo):
73+
The client info used to send a user-agent string along with
74+
API requests. If ``None``, then default info will be used.
75+
Generally, you only need to set this if you're developing
7676
your own client library.
7777
"""
7878
# Save the hostname. Default to port 443 (HTTPS) if none is specified.
@@ -87,7 +87,7 @@ class {{ service.name }}Transport(abc.ABC):
8787
# defaults.
8888
if credentials and credentials_file:
8989
raise exceptions.DuplicateCredentialArgs("'credentials_file' and 'credentials' are mutually exclusive")
90-
90+
9191
if credentials_file is not None:
9292
credentials, _ = auth.load_credentials_from_file(
9393
credentials_file,
@@ -177,7 +177,7 @@ class {{ service.name }}Transport(abc.ABC):
177177
],
178178
]:
179179
raise NotImplementedError()
180-
{% endif %}
180+
{% endif %}
181181

182182
__all__ = (
183183
'{{ service.name }}Transport',

gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/grpc.py.j2

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class {{ service.name }}GrpcTransport({{ service.name }}Transport):
119119
# If a channel was explicitly provided, set it.
120120
self._grpc_channel = channel
121121
self._ssl_channel_credentials = None
122-
122+
123123
else:
124124
if api_mtls_endpoint:
125125
host = api_mtls_endpoint
@@ -133,14 +133,14 @@ class {{ service.name }}GrpcTransport({{ service.name }}Transport):
133133
)
134134
else:
135135
self._ssl_channel_credentials = SslCredentials().ssl_credentials
136-
136+
137137
else:
138138
if client_cert_source_for_mtls and not ssl_channel_credentials:
139139
cert, key = client_cert_source_for_mtls()
140140
self._ssl_channel_credentials = grpc.ssl_channel_credentials(
141141
certificate_chain=cert, private_key=key
142142
)
143-
143+
144144
# The base transport sets the host, credentials and scopes
145145
super().__init__(
146146
host=host,

gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/grpc_asyncio.py.j2

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ class {{ service.grpc_asyncio_transport_name }}({{ service.name }}Transport):
121121
If provided, it overrides the ``host`` argument and tries to create
122122
a mutual TLS channel with client SSL credentials from
123123
``client_cert_source`` or applicatin default SSL credentials.
124-
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
124+
client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]):
125125
Deprecated. A callback to provide client SSL certificate bytes and
126126
private key bytes, both in PEM format. It is ignored if
127127
``api_mtls_endpoint`` is None.
@@ -133,10 +133,10 @@ class {{ service.grpc_asyncio_transport_name }}({{ service.name }}Transport):
133133
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
134134
quota_project_id (Optional[str]): An optional project to use for billing
135135
and quota.
136-
client_info (google.api_core.gapic_v1.client_info.ClientInfo):
137-
The client info used to send a user-agent string along with
138-
API requests. If ``None``, then default info will be used.
139-
Generally, you only need to set this if you're developing
136+
client_info (google.api_core.gapic_v1.client_info.ClientInfo):
137+
The client info used to send a user-agent string along with
138+
API requests. If ``None``, then default info will be used.
139+
Generally, you only need to set this if you're developing
140140
your own client library.
141141

142142
Raises:
@@ -151,7 +151,7 @@ class {{ service.grpc_asyncio_transport_name }}({{ service.name }}Transport):
151151
{%- if service.has_lro %}
152152
self._operations_client = None
153153
{%- endif %}
154-
154+
155155
if api_mtls_endpoint:
156156
warnings.warn("api_mtls_endpoint is deprecated", DeprecationWarning)
157157
if client_cert_source:
@@ -177,7 +177,7 @@ class {{ service.grpc_asyncio_transport_name }}({{ service.name }}Transport):
177177
)
178178
else:
179179
self._ssl_channel_credentials = SslCredentials().ssl_credentials
180-
180+
181181
else:
182182
if client_cert_source_for_mtls and not ssl_channel_credentials:
183183
cert, key = client_cert_source_for_mtls()
@@ -351,7 +351,7 @@ class {{ service.grpc_asyncio_transport_name }}({{ service.name }}Transport):
351351
response_deserializer=iam_policy.TestIamPermissionsResponse.FromString,
352352
)
353353
return self._stubs["test_iam_permissions"]
354-
{% endif %}
354+
{% endif %}
355355

356356
__all__ = (
357357
'{{ service.name }}GrpcAsyncIOTransport',

gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/rest.py.j2

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class {{ service.name }}RestTransport({{ service.name }}Transport):
6262
credentials identify the application to the service; if none
6363
are specified, the client will attempt to ascertain the
6464
credentials from the environment.
65-
65+
6666
credentials_file (Optional[str]): A file with credentials that can
6767
be loaded with :func:`google.auth.load_credentials_from_file`.
6868
This argument is ignored if ``channel`` is provided.
@@ -73,10 +73,10 @@ class {{ service.name }}RestTransport({{ service.name }}Transport):
7373
if ``channel`` is provided.
7474
quota_project_id (Optional[str]): An optional project to use for billing
7575
and quota.
76-
client_info (google.api_core.gapic_v1.client_info.ClientInfo):
77-
The client info used to send a user-agent string along with
78-
API requests. If ``None``, then default info will be used.
79-
Generally, you only need to set this if you're developing
76+
client_info (google.api_core.gapic_v1.client_info.ClientInfo):
77+
The client info used to send a user-agent string along with
78+
API requests. If ``None``, then default info will be used.
79+
Generally, you only need to set this if you're developing
8080
your own client library.
8181
"""
8282
# Run the base constructor
@@ -95,7 +95,7 @@ class {{ service.name }}RestTransport({{ service.name }}Transport):
9595
self._prep_wrapped_messages(client_info)
9696

9797
{%- if service.has_lro %}
98-
98+
9999
@property
100100
def operations_client(self) -> operations_v1.OperationsClient:
101101
"""Create the client designed to process long-running operations.
@@ -147,7 +147,7 @@ class {{ service.name }}RestTransport({{ service.name }}Transport):
147147
{%- endif %}
148148
"""
149149

150-
{# TODO(yon-mg): refactor when implementing grpc transcoding
150+
{# TODO(yon-mg): refactor when implementing grpc transcoding
151151
- parse request pb & assign body, path params
152152
- shove leftovers into query params
153153
- make sure dotted nested fields preserved

0 commit comments

Comments
 (0)