Skip to content

Commit 3789937

Browse files
committed
fixed lint
1 parent 45ec068 commit 3789937

4 files changed

Lines changed: 9 additions & 14 deletions

File tree

packages/google-cloud-bigtable/google/cloud/bigtable/data/_async/client.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,9 +1217,7 @@ async def read_rows_stream(
12171217
self,
12181218
operation_timeout=operation_timeout,
12191219
attempt_timeout=attempt_timeout,
1220-
metric=self._create_operation(
1221-
OperationType.READ_ROWS, is_streaming=True
1222-
),
1220+
metric=self._create_operation(OperationType.READ_ROWS, is_streaming=True),
12231221
retryable_exceptions=retryable_excs,
12241222
)
12251223
return row_merger.start_operation()
@@ -1323,9 +1321,7 @@ async def read_row(
13231321
self,
13241322
operation_timeout=operation_timeout,
13251323
attempt_timeout=attempt_timeout,
1326-
metric=self._create_operation(
1327-
OperationType.READ_ROWS, is_streaming=False
1328-
),
1324+
metric=self._create_operation(OperationType.READ_ROWS, is_streaming=False),
13291325
retryable_exceptions=retryable_excs,
13301326
)
13311327
results_generator = row_merger.start_operation()
@@ -1540,9 +1536,7 @@ async def sample_row_keys(
15401536
retryable_excs = _get_retryable_errors(retryable_errors, self)
15411537
predicate = retries.if_exception_type(*retryable_excs)
15421538

1543-
with self._create_operation(
1544-
OperationType.SAMPLE_ROW_KEYS
1545-
) as operation_metric:
1539+
with self._create_operation(OperationType.SAMPLE_ROW_KEYS) as operation_metric:
15461540

15471541
@CrossSync.convert
15481542
async def execute_rpc():
@@ -1674,9 +1668,7 @@ async def mutate_row(
16741668
# mutations should not be retried
16751669
predicate = retries.if_exception_type()
16761670

1677-
with self._create_operation(
1678-
OperationType.MUTATE_ROW
1679-
) as operation_metric:
1671+
with self._create_operation(OperationType.MUTATE_ROW) as operation_metric:
16801672
target = partial(
16811673
self.client._gapic_client.mutate_row,
16821674
request=MutateRowRequest(

packages/google-cloud-bigtable/google/cloud/bigtable/data/_metrics/handlers/gcp_exporter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def export(
168168
labels={
169169
"project_id": data_point.attributes.get(
170170
"resource_project", ""
171-
)
171+
),
172172
"instance": data_point.attributes.get(
173173
"resource_instance", ""
174174
),

packages/google-cloud-bigtable/tests/unit/data/_async/test_client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,9 @@ async def test_metrics_exporter_init_implicit_project(self):
240240

241241
@CrossSync.pytest
242242
@mock.patch("google.cloud.bigtable.data._async.client.BigtableMetricsExporter")
243-
@mock.patch("google.cloud.bigtable.data._sync_autogen.client.BigtableMetricsExporter")
243+
@mock.patch(
244+
"google.cloud.bigtable.data._sync_autogen.client.BigtableMetricsExporter"
245+
)
244246
async def test_veneer_grpc_headers(self, exporter_mock, exporter_mock_sync):
245247
client_component = "data-async" if CrossSync.is_async else "data"
246248
VENEER_HEADER_REGEX = re.compile(

packages/google-cloud-bigtable/tests/unit/data/_metrics/test_opentelemetry_handler.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
import dataclasses
15+
1516
import mock
1617
import pytest
1718
from grpc import StatusCode

0 commit comments

Comments
 (0)