Commit 001b051
refactor(waterdata): collapse _coerce_targets to a single scalar guard
The `isinstance(parsed, pd.DatetimeIndex)` early-return was redundant:
`pd.DatetimeIndex(parsed)` returns an equivalent index for an already-
parsed DatetimeIndex, so the three branches reduce to one scalar guard
that wraps a bare value in a list before constructing the index. Behavior
is unchanged for every input kind (DatetimeIndex, scalar string/Timestamp,
list, Series, ndarray, empty) — the existing nearest tests cover them all.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Sjb14HkwuCydKSKMsaXsgd1 parent 2df9743 commit 001b051
1 file changed
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
191 | | - | |
192 | 190 | | |
193 | | - | |
| 191 | + | |
194 | 192 | | |
195 | 193 | | |
196 | 194 | | |
| |||
0 commit comments