Skip to content

Commit 804d13c

Browse files
committed
Fix sql params type
1 parent 89e083b commit 804d13c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

pandas-stubs/io/sql.pyi

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ from collections.abc import (
22
Callable,
33
Generator,
44
Iterable,
5+
Mapping,
56
)
67
import sqlite3
78
from typing import (
@@ -65,7 +66,7 @@ def read_sql_query(
6566
con: _SQLConnection,
6667
index_col: str | list[str] | None = ...,
6768
coerce_float: bool = ...,
68-
params: list[str] | tuple[str, ...] | dict[str, str] | None = ...,
69+
params: list[Any] | tuple[Any, ...] | Mapping[str, Any] | None = ...,
6970
parse_dates: list[str] | dict[str, str] | dict[str, dict[str, Any]] | None = ...,
7071
*,
7172
chunksize: int,
@@ -78,7 +79,7 @@ def read_sql_query(
7879
con: _SQLConnection,
7980
index_col: str | list[str] | None = ...,
8081
coerce_float: bool = ...,
81-
params: list[str] | tuple[str, ...] | dict[str, str] | None = ...,
82+
params: list[Any] | tuple[Any, ...] | Mapping[str, Any] | None = ...,
8283
parse_dates: list[str] | dict[str, str] | dict[str, dict[str, Any]] | None = ...,
8384
chunksize: None = ...,
8485
dtype: DtypeArg | None = ...,
@@ -90,7 +91,7 @@ def read_sql(
9091
con: _SQLConnection,
9192
index_col: str | list[str] | None = ...,
9293
coerce_float: bool = ...,
93-
params: list[str] | tuple[str, ...] | dict[str, str] | None = ...,
94+
params: list[Any] | tuple[Any, ...] | Mapping[str, Any] | None = ...,
9495
parse_dates: list[str] | dict[str, str] | dict[str, dict[str, Any]] | None = ...,
9596
columns: list[str] = ...,
9697
*,
@@ -104,7 +105,7 @@ def read_sql(
104105
con: _SQLConnection,
105106
index_col: str | list[str] | None = ...,
106107
coerce_float: bool = ...,
107-
params: list[str] | tuple[str, ...] | dict[str, str] | None = ...,
108+
params: list[Any] | tuple[Any, ...] | Mapping[str, Any] | None = ...,
108109
parse_dates: list[str] | dict[str, str] | dict[str, dict[str, Any]] | None = ...,
109110
columns: list[str] = ...,
110111
chunksize: None = ...,

0 commit comments

Comments
 (0)