Skip to content

Commit

Permalink
fixed merge error
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-sanche committed Nov 12, 2024
1 parent 7c02dc0 commit d739797
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
10 changes: 2 additions & 8 deletions google/cloud/bigtable/data/_async/_mutate_rows.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

from typing import Sequence, TYPE_CHECKING
from dataclasses import dataclass
import functools

from google.api_core import exceptions as core_exceptions
from google.api_core import retry as retries
Expand Down Expand Up @@ -82,14 +81,8 @@ def __init__(
f"{_MUTATE_ROWS_REQUEST_MUTATION_LIMIT} mutations across "
f"all entries. Found {total_mutations}."
)
# create partial function to pass to trigger rpc call
self._table = table
self._gapic_fn = functools.partial(
gapic_client.mutate_rows,
table_name=table.table_name,
app_profile_id=table.app_profile_id,
retry=None,
)
self._gapic_fn = gapic_client.mutate_rows
# create predicate for determining which errors are retryable
self.is_retryable = retries.if_exception_type(
# RPC level errors
Expand Down Expand Up @@ -177,6 +170,7 @@ async def _run_attempt(self):
app_profile_id=self._table.app_profile_id,
),
timeout=next(self.timeout_generator),
retry=None
)
async for result_list in result_generator:
for result in result_list.entries:
Expand Down
4 changes: 0 additions & 4 deletions tests/unit/data/_async/test__mutate_rows.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,6 @@ def test_ctor(self):
assert client.mutate_rows.call_count == 0
instance._gapic_fn()
assert client.mutate_rows.call_count == 1
# gapic_fn should call with table details
inner_kwargs = client.mutate_rows.call_args[1]
assert len(inner_kwargs) == 3
assert inner_kwargs["retry"] is None
# entries should be passed down
entries_w_pb = [_EntryWithProto(e, e._to_pb()) for e in entries]
assert instance.mutations == entries_w_pb
Expand Down

0 comments on commit d739797

Please sign in to comment.