Commit 05f520b
Narrow AsyncAdaptedCursor description and executemany types
AsyncAdaptedCursor.description was typed Any, and
executemany(seq_of_parameters: Any) widened the dbapi's
Iterable[Sequence[Any]] back to Any. Runtime values already match
the narrower type (execute() copies the underlying cursor's
description straight in), so the widening only weakened type-checker
help for downstream consumers.
Introduce a local _Description alias mirroring the PEP 249 tuple
shape the dbapi populates (name, type_code, None, None, None, None,
None — dqlite fills only the first two fields) and annotate the
cursor's description attribute with it. Narrow executemany's
parameter type to Iterable[Sequence[Any]] matching the dbapi
counterpart.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent b9c7106 commit 05f520b
1 file changed
Lines changed: 12 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
23 | 32 | | |
24 | 33 | | |
25 | 34 | | |
| |||
34 | 43 | | |
35 | 44 | | |
36 | 45 | | |
37 | | - | |
| 46 | + | |
38 | 47 | | |
39 | 48 | | |
40 | 49 | | |
| |||
72 | 81 | | |
73 | 82 | | |
74 | 83 | | |
75 | | - | |
| 84 | + | |
76 | 85 | | |
77 | 86 | | |
78 | 87 | | |
| |||
0 commit comments