Skip to content

Commit 07b3381

Browse files
thodson-usgsclaude
andcommitted
docs(waterdata): keep unbounded-cap rationale only at the code site
Follow-up to the prior commit, which trimmed the test but lost the chunking.py half of the de-dup (a stray `git checkout` during local verification reverted it). The "None lifts the cap / semaphore sized at plan.total that can never block" mechanism is now stated once — at the inline comment above the `semaphore = ...` line — while the _run docstring body and the max_concurrent param doc state just the user-facing effect. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 0ca8487 commit 07b3381

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

dataretrieval/waterdata/chunking.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,8 +1554,7 @@ async def _run(self, max_concurrent: int | None) -> tuple[pd.DataFrame, Any]:
15541554
15551555
The gather dispatches *every* pending sub-request, but an
15561556
``asyncio.Semaphore`` gates the fetches so at most
1557-
``N = max_concurrent`` are in flight (``None`` degenerates to a
1558-
cap at the plan total — a gate that can never block);
1557+
``N = max_concurrent`` are in flight (``None`` lifts the cap);
15591558
``N=1`` is just a sequential gather (one request at a time) and
15601559
``total <= 1`` is just a one-element gather. The client's
15611560
connection pool is sized to match
@@ -1587,8 +1586,7 @@ async def _run(self, max_concurrent: int | None) -> tuple[pd.DataFrame, Any]:
15871586
----------
15881587
max_concurrent : int or None
15891588
Maximum sub-requests in flight (the semaphore value, and the
1590-
connection-pool size). ``None`` lifts the cap: the gate
1591-
degenerates to the plan total and the pool goes unbounded.
1589+
connection-pool size). ``None`` lifts the cap entirely.
15921590
15931591
Returns
15941592
-------

0 commit comments

Comments
 (0)