Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/google/adk/tools/bigtable/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def _get_client_info() -> google.api_core.client_info.ClientInfo:

def get_bigtable_data_client(
*, project: str, credentials: Credentials
) -> bigtable.BigtableDataClient:
) -> data.BigtableDataClient:
"""Get a Bigtable client."""

bigtable_data_client = data.BigtableDataClient(
Expand Down
8 changes: 8 additions & 0 deletions tests/unittests/tools/bigtable/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import typing
from unittest import mock

from google.adk.tools.bigtable import client
from google.auth.credentials import Credentials
from google.cloud.bigtable import data


def test_get_bigtable_data_client():
Expand Down Expand Up @@ -48,3 +50,9 @@ def test_get_bigtable_admin_client():
credentials=mock_creds,
client_info=mock.ANY,
)


def test_get_bigtable_data_client_return_annotation_resolves():
"""The data client return annotation must resolve to a real type."""
hints = typing.get_type_hints(client.get_bigtable_data_client)
assert hints["return"] is data.BigtableDataClient
Loading