Commit ba2e287
FIX: Address Copilot review on # sync .pyi stub, narrow internal helper586
Two follow-ups from the Copilot PR review:
1. mssql_python/mssql_python.pyi still carried the old invariant
signature
seq_of_parameters: Union[List[Sequence[Any]], List[Mapping[str, Any]]]
Sync it to the covariant Sequence form to match cursor.py and
prevent a silent regression if the stub is ever relocated to
__init__.pyi (where mypy would actually consume it).
2. _transpose_rowwise_to_columnwise is only ever called with
already-converted positional rows (pyformat-to-qmark conversion
happens upstream in executemany before transposition). Advertising
it as accepting Mapping rows is the transpose loopmisleading
would yield mapping keys, not values. Narrow its annotation to
Sequence[Sequence[Any]] only.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent a96601b commit ba2e287
2 files changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2015 | 2015 | | |
2016 | 2016 | | |
2017 | 2017 | | |
2018 | | - | |
| 2018 | + | |
2019 | 2019 | | |
2020 | 2020 | | |
2021 | 2021 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
197 | 199 | | |
198 | 200 | | |
199 | 201 | | |
| |||
0 commit comments