@@ -59,6 +59,13 @@ class _ReadRowsOperationAsync:
5959
6060 ReadRowsOperation(request, client) handles row merging logic end-to-end, including
6161 performing retries on stream errors.
62+
63+ Args:
64+ query: The query to execute
65+ table: The table to send the request to
66+ operation_timeout: The total time to allow for the operation, in seconds
67+ attempt_timeout: The time to allow for each individual attempt, in seconds
68+ retryable_exceptions: A list of exceptions that should trigger a retry
6269 """
6370
6471 __slots__ = (
@@ -104,6 +111,9 @@ def __init__(
104111 def start_operation (self ) -> AsyncGenerator [Row , None ]:
105112 """
106113 Start the read_rows operation, retrying on retryable errors.
114+
115+ Yields:
116+ Row: The next row in the stream
107117 """
108118 return retries .retry_target_stream_async (
109119 self ._read_rows_attempt ,
@@ -119,6 +129,9 @@ def _read_rows_attempt(self) -> AsyncGenerator[Row, None]:
119129 This function is intended to be wrapped by retry logic,
120130 which will call this function until it succeeds or
121131 a non-retryable error is raised.
132+
133+ Yields:
134+ Row: The next row in the stream
122135 """
123136 # revise request keys and ranges between attempts
124137 if self ._last_yielded_row_key is not None :
@@ -151,6 +164,11 @@ async def chunk_stream(
151164 ) -> AsyncGenerator [ReadRowsResponsePB .CellChunk , None ]:
152165 """
153166 process chunks out of raw read_rows stream
167+
168+ Args:
169+ stream: the raw read_rows stream from the gapic client
170+ Yields:
171+ ReadRowsResponsePB.CellChunk: the next chunk in the stream
154172 """
155173 async for resp in await stream :
156174 # extract proto from proto-plus wrapper
@@ -195,9 +213,14 @@ async def chunk_stream(
195213 @staticmethod
196214 async def merge_rows (
197215 chunks : AsyncGenerator [ReadRowsResponsePB .CellChunk , None ] | None
198- ):
216+ ) -> AsyncGenerator [ Row , None ] :
199217 """
200218 Merge chunks into rows
219+
220+ Args:
221+ chunks: the chunk stream to merge
222+ Yields:
223+ Row: the next row in the stream
201224 """
202225 if chunks is None :
203226 return
@@ -311,10 +334,12 @@ def _revise_request_rowset(
311334 Revise the rows in the request to avoid ones we've already processed.
312335
313336 Args:
314- - row_set: the row set from the request
315- - last_seen_row_key: the last row key encountered
337+ row_set: the row set from the request
338+ last_seen_row_key: the last row key encountered
339+ Returns:
340+ RowSetPB: the new rowset after adusting for the last seen key
316341 Raises:
317- - _RowSetComplete: if there are no rows left to process after the revision
342+ _RowSetComplete: if there are no rows left to process after the revision
318343 """
319344 # if user is doing a whole table scan, start a new one with the last seen key
320345 if row_set is None or (not row_set .row_ranges and row_set .row_keys is not None ):
0 commit comments