Commit 526a7e4
Tighten chunking docstrings for accuracy and clarity
Five docstring fixes, no behavior change:
1. ``_plan_chunks`` docstring described the first ``RequestTooLarge``
case as "filter (if any) is already at its smallest OR-clause" —
same wrong-direction error already fixed on ``RequestTooLarge``.
The planner probes at the inner chunker's BAIL floor (longest
clause's URL contribution), not the smallest. Rewrite to "the
smallest reducible plan" with the bail-floor clarification.
2. The ``RequestTooLarge`` raised inside the halving loop carried
a matching wrong-direction phrase ("any chunkable filter reduced
to one OR-clause"). Rewrite to "any chunkable filter at the
inner chunker's bail-floor size" and broaden the user advice to
include "shorten the filter".
3. ``_chunk_bytes`` docstring claimed it's "indirectly used as the
URL contribution estimate" — that's not what the code does; the
function is a comparator only. Trim the misleading sentence and
keep the rationale for ``quote_plus`` over raw join length.
4. ``_worst_case_args`` docstring's "with the filter already reduced
to its filter-chunker floor" was oblique. Rewrite to make the
chain explicit: caller passes ``probe_args`` (already through
``_filter_aware_probe_args``), and this function uses each dim's
largest chunk against that.
5. The ``_DEFAULT_MAX_CHUNKS`` module comment said it's "read lazily
in the wrapper" — stale; ``_plan_chunks`` now also resolves
lazily. Update to "both the decorator wrapper and ``_plan_chunks``".
209 waterdata tests pass; ruff clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 3b11ce5 commit 526a7e4
1 file changed
Lines changed: 25 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
| 88 | + | |
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
| |||
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
214 | 215 | | |
215 | 216 | | |
216 | 217 | | |
| |||
235 | 236 | | |
236 | 237 | | |
237 | 238 | | |
238 | | - | |
239 | | - | |
240 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
241 | 245 | | |
242 | 246 | | |
243 | 247 | | |
| |||
254 | 258 | | |
255 | 259 | | |
256 | 260 | | |
257 | | - | |
258 | | - | |
259 | | - | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
260 | 264 | | |
261 | 265 | | |
262 | 266 | | |
| |||
291 | 295 | | |
292 | 296 | | |
293 | 297 | | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
298 | 304 | | |
299 | 305 | | |
300 | 306 | | |
| |||
0 commit comments