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

Commit 5ff2bf2

Browse files
update type hinting in client.py.j2
1 parent 39b72ec commit 5ff2bf2

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • gapic/templates/%namespace/%name_%version/%sub/services/%service

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,15 +143,15 @@ class {{ service.client_name }}(metaclass={{ service.client_name }}Meta):
143143
This class implements API version {{ service.version }}.{% endif %}"""
144144

145145
@staticmethod
146-
def _get_default_mtls_endpoint(api_endpoint):
146+
def _get_default_mtls_endpoint(api_endpoint) -> Optional[str]:
147147
"""Converts api endpoint to mTLS endpoint.
148148

149149
Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to
150150
"*.mtls.sandbox.googleapis.com" and "*.mtls.googleapis.com" respectively.
151151
Args:
152152
api_endpoint (Optional[str]): the api endpoint to convert.
153153
Returns:
154-
str: converted mTLS api endpoint.
154+
Optional[str]: converted mTLS api endpoint.
155155
"""
156156
if not api_endpoint:
157157
return api_endpoint
@@ -387,7 +387,7 @@ class {{ service.client_name }}(metaclass={{ service.client_name }}Meta):
387387
return client_cert_source
388388

389389
@staticmethod
390-
def _get_api_endpoint(api_override, client_cert_source, universe_domain, use_mtls_endpoint):
390+
def _get_api_endpoint(api_override, client_cert_source, universe_domain, use_mtls_endpoint) -> str:
391391
"""Return the API endpoint used by the client.
392392

393393
Args:
@@ -473,7 +473,7 @@ class {{ service.client_name }}(metaclass={{ service.client_name }}Meta):
473473
error._details.append(json.dumps(cred_info))
474474

475475
@property
476-
def api_endpoint(self):
476+
def api_endpoint(self) -> str:
477477
"""Return the API endpoint used by the client instance.
478478

479479
Returns:

0 commit comments

Comments
 (0)