Skip to content

Commit 09cad1e

Browse files
committed
Accept sqlalchemy.engine.Engine
1 parent cca0e96 commit 09cad1e

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

pandas-stubs/core/generic.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ class NDFrame(PandasObject, indexing.IndexingMixin):
160160
def to_sql(
161161
self,
162162
name: _str,
163-
con: str | sqlalchemy.engine.Connection | sqlite3.Connection,
163+
con: str | sqlalchemy.engine.Connectable | sqlite3.Connection,
164164
schema: _str | None = ...,
165165
if_exists: Literal["fail", "replace", "append"] = ...,
166166
index: _bool = ...,

pandas-stubs/io/sql.pyi

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class DatabaseError(IOError): ...
2323
@overload
2424
def read_sql_table(
2525
table_name: str,
26-
con: str | sqlalchemy.engine.Connection | sqlite3.Connection,
26+
con: str | sqlalchemy.engine.Connectable | sqlite3.Connection,
2727
schema: str | None = ...,
2828
index_col: str | list[str] | None = ...,
2929
coerce_float: bool = ...,
@@ -35,7 +35,7 @@ def read_sql_table(
3535
@overload
3636
def read_sql_table(
3737
table_name: str,
38-
con: str | sqlalchemy.engine.Connection | sqlite3.Connection,
38+
con: str | sqlalchemy.engine.Connectable | sqlite3.Connection,
3939
schema: str | None = ...,
4040
index_col: str | list[str] | None = ...,
4141
coerce_float: bool = ...,
@@ -46,7 +46,7 @@ def read_sql_table(
4646
@overload
4747
def read_sql_query(
4848
sql: str,
49-
con: str | sqlalchemy.engine.Connection | sqlite3.Connection,
49+
con: str | sqlalchemy.engine.Connectable | sqlite3.Connection,
5050
index_col: str | list[str] | None = ...,
5151
coerce_float: bool = ...,
5252
params: list[str] | tuple[str, ...] | dict[str, str] | None = ...,
@@ -58,7 +58,7 @@ def read_sql_query(
5858
@overload
5959
def read_sql_query(
6060
sql: str,
61-
con: str | sqlalchemy.engine.Connection | sqlite3.Connection,
61+
con: str | sqlalchemy.engine.Connectable | sqlite3.Connection,
6262
index_col: str | list[str] | None = ...,
6363
coerce_float: bool = ...,
6464
params: list[str] | tuple[str, ...] | dict[str, str] | None = ...,
@@ -69,7 +69,7 @@ def read_sql_query(
6969
@overload
7070
def read_sql(
7171
sql: str,
72-
con: str | sqlalchemy.engine.Connection | sqlite3.Connection,
72+
con: str | sqlalchemy.engine.Connectable | sqlite3.Connection,
7373
index_col: str | list[str] | None = ...,
7474
coerce_float: bool = ...,
7575
params: list[str] | tuple[str, ...] | dict[str, str] | None = ...,
@@ -81,7 +81,7 @@ def read_sql(
8181
@overload
8282
def read_sql(
8383
sql: str,
84-
con: str | sqlalchemy.engine.Connection | sqlite3.Connection,
84+
con: str | sqlalchemy.engine.Connectable | sqlite3.Connection,
8585
index_col: str | list[str] | None = ...,
8686
coerce_float: bool = ...,
8787
params: list[str] | tuple[str, ...] | dict[str, str] | None = ...,

0 commit comments

Comments
 (0)