Skip to content

Commit c7d496c

Browse files
bewithgauravCopilot
andcommitted
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 c7d496c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mssql_python/cursor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2015,7 +2015,7 @@ def columns(self, table=None, catalog=None, schema=None, column=None):
20152015

20162016
def _transpose_rowwise_to_columnwise(
20172017
self,
2018-
seq_of_parameters: Union[Sequence[Sequence[Any]], Sequence[Mapping[str, Any]]],
2018+
seq_of_parameters: Sequence[Sequence[Any]],
20192019
) -> tuple[list, int]:
20202020
"""
20212021
Convert sequence of rows (row-wise) into list of columns (column-wise),

0 commit comments

Comments
 (0)