Commit 2679879
Narrow AsyncAdaptedCursor.fetchone return type to Any | None
The method returns None when the buffered deque is empty, matching the
PEP 249 contract, but the annotation said Any — which swallows the None
case silently at call sites. Align with the sibling dqlitedbapi.Cursor
and dqlitedbapi.aio.AsyncCursor, which both type fetchone as
tuple[Any, ...] | None, and pin the annotation so a future widening is
caught in tests.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent eee2b82 commit 2679879
2 files changed
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
137 | 141 | | |
138 | 142 | | |
139 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
383 | 395 | | |
384 | 396 | | |
385 | 397 | | |
| |||
0 commit comments