Skip to content

Commit a4513c4

Browse files
committed
fix: add underscore prefix to internal helpers in client_helpers.py
1 parent 46e0797 commit a4513c4

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

  • packages
    • google-api-core/google/api_core/gapic_v1
    • google-cloud-kms/google/cloud/kms_v1/services/key_management_service

packages/google-api-core/google/api_core/gapic_v1/client_helpers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
)
2929

3030

31-
def get_default_mtls_endpoint(api_endpoint: Optional[str]) -> Optional[str]:
31+
def _get_default_mtls_endpoint(api_endpoint: Optional[str]) -> Optional[str]:
3232
"""Converts api endpoint to mTLS endpoint.
3333
3434
Convert "*.sandbox.googleapis.com" and "*.googleapis.com" to
@@ -58,7 +58,7 @@ def get_default_mtls_endpoint(api_endpoint: Optional[str]) -> Optional[str]:
5858
return api_endpoint.replace(".googleapis.com", ".mtls.googleapis.com")
5959

6060

61-
def use_client_cert_effective() -> bool:
61+
def _use_client_cert_effective() -> bool:
6262
"""Returns whether client certificate should be used for mTLS if the
6363
google-auth version supports should_use_client_cert automatic mTLS enablement.
6464
@@ -86,7 +86,7 @@ def use_client_cert_effective() -> bool:
8686
return use_client_cert_str == "true"
8787

8888

89-
def get_api_endpoint(
89+
def _get_api_endpoint(
9090
api_override: Optional[str],
9191
client_cert_source: Optional[Any],
9292
universe_domain: str,

packages/google-cloud-kms/google/cloud/kms_v1/services/key_management_service/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def _get_default_mtls_endpoint(api_endpoint) -> Optional[str]:
145145
Returns:
146146
Optional[str]: converted mTLS api endpoint.
147147
"""
148-
return gapic_v1.client_helpers.get_default_mtls_endpoint(api_endpoint)
148+
return gapic_v1.client_helpers._get_default_mtls_endpoint(api_endpoint)
149149

150150
# Note: DEFAULT_ENDPOINT is deprecated. Use _DEFAULT_ENDPOINT_TEMPLATE instead.
151151
DEFAULT_ENDPOINT = "cloudkms.googleapis.com"
@@ -169,7 +169,7 @@ def _use_client_cert_effective():
169169
ValueError: (If using a version of google-auth without should_use_client_cert and
170170
GOOGLE_API_USE_CLIENT_CERTIFICATE is set to an unexpected value.)
171171
"""
172-
return gapic_v1.client_helpers.use_client_cert_effective()
172+
return gapic_v1.client_helpers._use_client_cert_effective()
173173

174174
@classmethod
175175
def from_service_account_info(cls, info: dict, *args, **kwargs):
@@ -566,7 +566,7 @@ def _get_api_endpoint(
566566
Returns:
567567
str: The API endpoint to be used by the client.
568568
"""
569-
return gapic_v1.client_helpers.get_api_endpoint(
569+
return gapic_v1.client_helpers._get_api_endpoint(
570570
api_override,
571571
client_cert_source,
572572
universe_domain,

0 commit comments

Comments
 (0)