diff --git a/mssql_python/cursor.py b/mssql_python/cursor.py index f0b1d6a6..2341ffa9 100644 --- a/mssql_python/cursor.py +++ b/mssql_python/cursor.py @@ -2013,7 +2013,10 @@ def columns(self, table=None, catalog=None, schema=None, column=None): # Use the helper method to prepare the result set return self._prepare_metadata_result_set(fallback_description=fallback_description) - def _transpose_rowwise_to_columnwise(self, seq_of_parameters: list) -> tuple[list, int]: + def _transpose_rowwise_to_columnwise( + self, + seq_of_parameters: Sequence[Sequence[Any]], + ) -> tuple[list, int]: """ Convert sequence of rows (row-wise) into list of columns (column-wise), for array binding via ODBC. Works with both iterables and generators. @@ -2131,7 +2134,9 @@ def _compute_column_type(self, column): return sample_value, None, None, max_decimal_formatted_len def executemany( # pylint: disable=too-many-locals,too-many-branches,too-many-statements - self, operation: str, seq_of_parameters: Union[List[Sequence[Any]], List[Mapping[str, Any]]] + self, + operation: str, + seq_of_parameters: Union[Sequence[Sequence[Any]], Sequence[Mapping[str, Any]]], ) -> None: """ Prepare a database operation and execute it against all parameter sequences. diff --git a/mssql_python/mssql_python.pyi b/mssql_python/mssql_python.pyi index 9b08913d..ad18756e 100644 --- a/mssql_python/mssql_python.pyi +++ b/mssql_python/mssql_python.pyi @@ -193,7 +193,9 @@ class Cursor: reset_cursor: bool = True, ) -> "Cursor": ... def executemany( - self, operation: str, seq_of_parameters: Union[List[Sequence[Any]], List[Mapping[str, Any]]] + self, + operation: str, + seq_of_parameters: Union[Sequence[Sequence[Any]], Sequence[Mapping[str, Any]]], ) -> None: ... def fetchone(self) -> Optional[Row]: ... def fetchmany(self, size: Optional[int] = None) -> List[Row]: ...