SQLAlchemy: Use ParamSpec for Engine.transaction() and Engine.run_callable() (#8718)

This commit is contained in:
Nikita Sobolev
2022-09-10 18:29:54 +03:00
committed by GitHub
parent 4f2666ba8e
commit 43d4174590

View File

@@ -183,12 +183,10 @@ class Engine(Connectable, Identified):
) -> None: ...
def begin(self, close_with_result: bool = ...) -> _trans_ctx: ...
# TODO:
# def transaction(self, callable_: Callable[Concatenate[Connection, _P], _T], *args: _P.args, **kwargs: _P.kwargs) -> _T | None: ...
def transaction(self, callable_: Callable[..., _T], *args: Any, **kwargs: Any) -> _T | None: ...
# TODO:
# def run_callable(self, callable_: Callable[Concatenate[Connection, _P], _T], *args: _P.args, **kwargs: _P.kwargs) -> _T: ...
def run_callable(self, callable_: Callable[..., _T], *args: Any, **kwargs: Any) -> _T: ...
def transaction(
self, callable_: Callable[Concatenate[Connection, _P], _T], *args: _P.args, **kwargs: _P.kwargs
) -> _T | None: ...
def run_callable(self, callable_: Callable[Concatenate[Connection, _P], _T], *args: _P.args, **kwargs: _P.kwargs) -> _T: ...
@overload # type: ignore[override]
def execute(self, statement: _Executable, *multiparams: Mapping[str, Any], **params: Any) -> CursorResult: ...
@overload