File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -177,9 +177,7 @@ async def connect(
177177 enable debug logging to diagnose cluster churn instead of
178178 seeing only the final exception (ISSUE-78).
179179 """
180- attempts_cap = (
181- max_attempts if max_attempts is not None else _DEFAULT_CONNECT_MAX_ATTEMPTS
182- )
180+ attempts_cap = max_attempts if max_attempts is not None else _DEFAULT_CONNECT_MAX_ATTEMPTS
183181 if attempts_cap < 1 :
184182 raise ValueError (f"max_attempts must be >= 1, got { attempts_cap } " )
185183
Original file line number Diff line number Diff line change 3232_READ_CHUNK_SIZE = 4096
3333
3434
35- def _validate_positive_int_or_none (
36- value : int | None , name : str
37- ) -> int | None :
35+ def _validate_positive_int_or_none (value : int | None , name : str ) -> int | None :
3836 """Shared validation for positive-int-or-None parameters.
3937
4038 Used for both ``max_total_rows`` and ``max_continuation_frames``
@@ -278,10 +276,7 @@ async def _drain_continuations(
278276 raise ProtocolError (
279277 "ROWS continuation made no progress: frame had 0 rows and has_more=True"
280278 )
281- if (
282- self ._max_continuation_frames is not None
283- and frames > self ._max_continuation_frames
284- ):
279+ if self ._max_continuation_frames is not None and frames > self ._max_continuation_frames :
285280 # Per-frame cap complements max_total_rows (ISSUE-98): a
286281 # slow-drip server sending 1-row-per-frame would
287282 # otherwise pin a client CPU with O(n) iterations of
You can’t perform that action at this time.
0 commit comments