Commit 1618f6b
Raise on empty targets instead of issuing a no-op request
Calling ``get_nearest_continuous`` with an empty ``targets`` is
almost always a caller bug (an unfiltered frame, a typo, a mis-named
column). The previous code papered over it by firing a trivial-range
HTTP request (``time=1900-01-01/1900-01-01``) purely so the caller
received a real ``BaseMetadata`` object. That pattern wastes a
round-trip on a nonsensical input and hides the bug.
Raise ``ValueError`` on empty ``targets`` instead. Shrinks the body
and makes a caller mistake loud.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 2613792 commit 1618f6b
2 files changed
Lines changed: 8 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
565 | 565 | | |
566 | 566 | | |
567 | 567 | | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
573 | | - | |
574 | | - | |
575 | | - | |
576 | | - | |
577 | | - | |
| 568 | + | |
578 | 569 | | |
579 | 570 | | |
580 | 571 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
184 | 181 | | |
185 | 182 | | |
186 | 183 | | |
| |||
0 commit comments