Skip to content

Commit 43d4174

Browse files
authored
SQLAlchemy: Use ParamSpec for Engine.transaction() and Engine.run_callable() (#8718)
1 parent 4f2666b commit 43d4174

File tree

1 file changed

+4
-6
lines changed
  • stubs/SQLAlchemy/sqlalchemy/engine

1 file changed

+4
-6
lines changed

stubs/SQLAlchemy/sqlalchemy/engine/base.pyi

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,10 @@ class Engine(Connectable, Identified):
183183
) -> None: ...
184184

185185
def begin(self, close_with_result: bool = ...) -> _trans_ctx: ...
186-
# TODO:
187-
# def transaction(self, callable_: Callable[Concatenate[Connection, _P], _T], *args: _P.args, **kwargs: _P.kwargs) -> _T | None: ...
188-
def transaction(self, callable_: Callable[..., _T], *args: Any, **kwargs: Any) -> _T | None: ...
189-
# TODO:
190-
# def run_callable(self, callable_: Callable[Concatenate[Connection, _P], _T], *args: _P.args, **kwargs: _P.kwargs) -> _T: ...
191-
def run_callable(self, callable_: Callable[..., _T], *args: Any, **kwargs: Any) -> _T: ...
186+
def transaction(
187+
self, callable_: Callable[Concatenate[Connection, _P], _T], *args: _P.args, **kwargs: _P.kwargs
188+
) -> _T | None: ...
189+
def run_callable(self, callable_: Callable[Concatenate[Connection, _P], _T], *args: _P.args, **kwargs: _P.kwargs) -> _T: ...
192190
@overload # type: ignore[override]
193191
def execute(self, statement: _Executable, *multiparams: Mapping[str, Any], **params: Any) -> CursorResult: ...
194192
@overload

0 commit comments

Comments
 (0)