Skip to content

Commit 69260e5

Browse files
committed
fix: address lint and mypy issues in api_core and kms
1 parent 54cf6a0 commit 69260e5

3 files changed

Lines changed: 4 additions & 11 deletions

File tree

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,3 @@
2929
"method_async",
3030
"routing_header",
3131
]
32-

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,15 @@ def get_api_endpoint(
110110
Optional[str]: The API endpoint to be used by the client.
111111
"""
112112
if api_override is not None:
113-
api_endpoint = api_override
113+
return api_override
114114
elif use_mtls_endpoint == "always" or (
115115
use_mtls_endpoint == "auto" and client_cert_source
116116
):
117117
if universe_domain != default_universe:
118118
raise MutualTLSChannelError(
119119
f"mTLS is not supported in any universe other than {default_universe}."
120120
)
121-
api_endpoint = default_mtls_endpoint
121+
return default_mtls_endpoint
122122
else:
123-
api_endpoint = default_endpoint_template.format(UNIVERSE_DOMAIN=universe_domain)
124-
return api_endpoint
123+
return default_endpoint_template.format(UNIVERSE_DOMAIN=universe_domain)
124+

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,6 @@ def _use_client_cert_effective():
171171
"""
172172
return gapic_v1.client_helpers.use_client_cert_effective()
173173

174-
175-
176-
177174
@classmethod
178175
def from_service_account_info(cls, info: dict, *args, **kwargs):
179176
"""Creates an instance of this client using the provided credentials
@@ -579,9 +576,6 @@ def _get_api_endpoint(
579576
KeyManagementServiceClient._DEFAULT_ENDPOINT_TEMPLATE,
580577
)
581578

582-
583-
584-
585579
@staticmethod
586580
def _get_universe_domain(
587581
client_universe_domain: Optional[str], universe_domain_env: Optional[str]

0 commit comments

Comments
 (0)