Skip to content

Commit

Permalink
Merge branch 'cross_sync2_pr2_annotations' into cross_sync2_pr3_gener…
Browse files Browse the repository at this point in the history
…ated_sync
  • Loading branch information
daniel-sanche committed Sep 18, 2024
2 parents ab6fa6d + 7c52d54 commit ea281a6
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion google/cloud/bigtable/data/_async/_mutate_rows.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
from google.cloud.bigtable_v2.services.bigtable.client import ( # type: ignore
BigtableClient as GapicClientType,
)
from google.cloud.bigtable.data._sync.client import Table as TableType # type: ignore
from google.cloud.bigtable.data._sync_autogen.client import Table as TableType # type: ignore

__CROSS_SYNC_OUTPUT__ = "google.cloud.bigtable.data._sync_autogen._mutate_rows"

Expand Down
2 changes: 1 addition & 1 deletion google/cloud/bigtable/data/_async/_read_rows.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
if CrossSync.is_async:
from google.cloud.bigtable.data._async.client import TableAsync as TableType
else:
from google.cloud.bigtable.data._sync.client import Table as TableType # type: ignore
from google.cloud.bigtable.data._sync_autogen.client import Table as TableType # type: ignore

__CROSS_SYNC_OUTPUT__ = "google.cloud.bigtable.data._sync_autogen._read_rows"

Expand Down
4 changes: 2 additions & 2 deletions google/cloud/bigtable/data/_async/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@
else:
from typing import Iterable # noqa: F401
from google.cloud.bigtable_v2.services.bigtable.transports.pooled_grpc import PooledBigtableGrpcTransport as PooledTransportType # type: ignore
from google.cloud.bigtable.data._sync.mutations_batcher import ( # noqa: F401
from google.cloud.bigtable.data._sync_autogen.mutations_batcher import ( # noqa: F401
MutationsBatcher,
)
from google.cloud.bigtable.data.execute_query._sync.execute_query_iterator import ( # noqa: F401
from google.cloud.bigtable.data.execute_query._sync_autogen.execute_query_iterator import ( # noqa: F401
ExecuteQueryIterator,
)

Expand Down
2 changes: 1 addition & 1 deletion google/cloud/bigtable/data/_async/mutations_batcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
if CrossSync.is_async:
from google.cloud.bigtable.data._async.client import TableAsync as TableType
else:
from google.cloud.bigtable.data._sync.client import Table as TableType # type: ignore
from google.cloud.bigtable.data._sync_autogen.client import Table as TableType # type: ignore

__CROSS_SYNC_OUTPUT__ = "google.cloud.bigtable.data._sync_autogen.mutations_batcher"

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/data/_async/test__read_rows.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_ctor(self):
expected_operation_timeout = 42
expected_request_timeout = 44
time_gen_mock = mock.Mock()
subpath = "_async" if CrossSync.is_async else "_sync"
subpath = "_async" if CrossSync.is_async else "_sync_autogen"
with mock.patch(
f"google.cloud.bigtable.data.{subpath}._read_rows._attempt_timeout_generator",
time_gen_mock,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/data/_async/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
CrossSync.add_mapping("grpc_helpers", grpc_helpers_async)
else:
from google.api_core import grpc_helpers
from google.cloud.bigtable.data._sync.client import Table # noqa: F401
from google.cloud.bigtable.data._sync_autogen.client import Table # noqa: F401

CrossSync.add_mapping("grpc_helpers", grpc_helpers)

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/data/_async/test_mutations_batcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ async def test_add_to_flow_max_mutation_limits(
Test flow control running up against the max API limit
Should submit request early, even if the flow control has room for more
"""
subpath = "_async" if CrossSync.is_async else "_sync"
subpath = "_async" if CrossSync.is_async else "_sync_autogen"
path = f"google.cloud.bigtable.data.{subpath}.mutations_batcher._MUTATE_ROWS_REQUEST_MUTATION_LIMIT"
with mock.patch(path, max_limit):
mutation_objs = [
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/data/_cross_sync/test_cross_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import functools
import sys
from google import api_core
from google.cloud.bigtable.data._sync.cross_sync.cross_sync import CrossSync, T
from google.cloud.bigtable.data._cross_sync.cross_sync import CrossSync, T

# try/except added for compatibility with python < 3.8
try:
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/data/_cross_sync/test_cross_sync_decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
import pytest_asyncio
import ast
from unittest import mock
from google.cloud.bigtable.data._sync.cross_sync.cross_sync import CrossSync
from google.cloud.bigtable.data._sync.cross_sync._decorators import (
from google.cloud.bigtable.data._cross_sync.cross_sync import CrossSync
from google.cloud.bigtable.data._cross_sync._decorators import (
ConvertClass,
Convert,
Drop,
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/data/execute_query/_async/test_query_iterator.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from google.cloud.bigtable_v2.types.bigtable import ExecuteQueryResponse
from .._testing import TYPE_INT, split_bytes_into_chunks, proto_rows_bytes

from google.cloud.bigtable.data._sync.cross_sync import CrossSync
from google.cloud.bigtable.data._cross_sync import CrossSync

# try/except added for compatibility with python < 3.8
try:
Expand All @@ -26,7 +26,7 @@
import mock # type: ignore


__CROSS_SYNC_OUTPUT__ = "tests.unit.data.execute_query._sync.test_query_iterator"
__CROSS_SYNC_OUTPUT__ = "tests.unit.data.execute_query._sync_autogen.test_query_iterator"


@CrossSync.convert_class(sync_name="MockIterator")
Expand Down

0 comments on commit ea281a6

Please sign in to comment.