Skip to content

Commit 3cd73e8

Browse files
committed
fix: use explicit is not None check for row_range in client
Updates the row_range check in both async and sync clients to use an explicit `is not None` check rather than truthiness evaluation. TAG=agy CONV=6cea44b5-6adb-45c6-b8c8-58b37f95584c
1 parent ce74362 commit 3cd73e8

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

  • packages/google-cloud-bigtable/google/cloud/bigtable/data

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1447,7 +1447,7 @@ async def execute_rpc():
14471447
results = await self.client._gapic_client.sample_row_keys(
14481448
request=SampleRowKeysRequest(
14491449
app_profile_id=self.app_profile_id,
1450-
row_range=row_range._to_pb() if row_range else None,
1450+
row_range=row_range._to_pb() if row_range is not None else None,
14511451
**self._request_path
14521452
),
14531453
timeout=next(attempt_timeout_gen),

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,7 @@ def execute_rpc():
11911191
results = self.client._gapic_client.sample_row_keys(
11921192
request=SampleRowKeysRequest(
11931193
app_profile_id=self.app_profile_id,
1194-
row_range=row_range._to_pb() if row_range else None,
1194+
row_range=row_range._to_pb() if row_range is not None else None,
11951195
**self._request_path,
11961196
),
11971197
timeout=next(attempt_timeout_gen),

0 commit comments

Comments
 (0)