Skip to content

Commit b2dde95

Browse files
committed
fix lint
1 parent 840843a commit b2dde95

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@
1717
This is used by gapic clients to provide common error mapping, retry, timeout,
1818
compression, pagination, and long-running operations to gRPC methods.
1919
"""
20-
from typing import Tuple, List
20+
2121
import enum
2222
import functools
23+
from typing import List, Tuple
2324

2425
from google.api_core import grpc_helpers
2526
from google.api_core.gapic_v1 import client_info
@@ -69,7 +70,7 @@ def _extract_metrics_header(metadata) -> Tuple[str, List[Tuple[str, str]]]:
6970
- a string representing the header value.
7071
"""
7172
if not metadata:
72-
return "", ()
73+
return "", []
7374

7475
key_to_find = client_info.METRICS_METADATA_KEY
7576

@@ -122,7 +123,7 @@ def __init__(
122123
if x_goog_api_client:
123124
self._default_metadata = (
124125
(client_info.METRICS_METADATA_KEY, x_goog_api_client),
125-
*self._static_metadata
126+
*self._static_metadata,
126127
)
127128
else:
128129
self._default_metadata = self._static_metadata
@@ -153,7 +154,9 @@ def __call__(
153154
user_x_goog, remaining = _extract_metrics_header(user_metadata)
154155
api_client_tokens = [t for t in [user_x_goog, self._x_goog_api_client] if t]
155156
if api_client_tokens:
156-
final_metadata.append((client_info.METRICS_METADATA_KEY, " ".join(api_client_tokens)))
157+
final_metadata.append(
158+
(client_info.METRICS_METADATA_KEY, " ".join(api_client_tokens))
159+
)
157160
final_metadata.extend(remaining)
158161
kwargs["metadata"] = final_metadata
159162
elif self._default_metadata:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
if they are not already set.
2222
"""
2323

24-
from typing import Union
2524
import uuid
25+
from typing import Union
2626

2727
import google.protobuf.message
2828

packages/google-api-core/tests/unit/gapic/test_requests.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
from google.api_core.gapic_v1.requests import setup_request_id
2121

22-
2322
# --- Mock Request Helper Classes ---
2423

2524

0 commit comments

Comments
 (0)