Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit 2c34198

Browse files
committed
use standard context manager
1 parent 8c397bb commit 2c34198

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

google/cloud/bigtable/data/_metrics/data_model.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -409,19 +409,19 @@ def _handle_error(message: str) -> None:
409409
full_message = f"Error in Bigtable Metrics: {message}"
410410
LOGGER.warning(full_message)
411411

412-
async def __aenter__(self):
412+
def __aenter__(self):
413413
"""
414-
Implements the async context manager protocol for wrapping unary calls
414+
Implements the async manager protocol
415415
416416
Using the operation's context manager provides assurances that the operation
417417
is always closed when complete, with the proper status code automaticallty
418418
detected when an exception is raised.
419419
"""
420420
return self
421421

422-
async def __aexit__(self, exc_type, exc_val, exc_tb):
422+
def __aexit__(self, exc_type, exc_val, exc_tb):
423423
"""
424-
Implements the async context manager protocol for wrapping unary calls
424+
Implements the context manager protocol
425425
426426
The operation is automatically ended on exit, with the status determined
427427
by the exception type and value.

0 commit comments

Comments
 (0)