Skip to content

Commit 1fffd91

Browse files
authored
Fix Connection.connection to return _ConnectionFairy as documented (#216)
https://docs.sqlalchemy.org/en/14/core/connections.html#sqlalchemy.engine.Connection.connection
1 parent d04a1ef commit 1fffd91

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sqlalchemy-stubs/engine/base.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ from .._typing import _ExecuteOptions
2222
from .._typing import _ExecuteParams
2323
from ..exc import StatementError
2424
from ..pool import Pool
25+
from ..pool.base import _ConnectionFairy
2526

2627
_T = TypeVar("_T")
2728
_T_co = TypeVar("_T_co", covariant=True)
@@ -64,7 +65,7 @@ class Connection(_ConnectionTypingCommon, Connectable):
6465
def execution_options(self: _TConnection, **opt: Any) -> _TConnection: ...
6566
def get_execution_options(self) -> _ExecuteOptions: ...
6667
@property
67-
def connection(self) -> _DBAPIConnection: ...
68+
def connection(self) -> _ConnectionFairy: ...
6869
def get_isolation_level(self) -> Any: ...
6970
@property
7071
def info(self) -> MutableMapping[Any, Any]: ...

0 commit comments

Comments
 (0)