Skip to content

Commit 4f2591e

Browse files
committed
Fix typing of make_async_execute
1 parent f8a111f commit 4f2591e

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

tests/test_routes/test_routes.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# pylint: disable=redefined-outer-name,
22
import random
33
from datetime import date, timedelta
4-
from typing import Any, AsyncGenerator, Callable, Coroutine, Dict, Optional, Tuple
4+
from typing import Any, AsyncGenerator, Callable, Coroutine, Optional, Tuple
55
from unittest.mock import AsyncMock
66
from uuid import UUID
77

@@ -145,15 +145,11 @@ async def create_subscription(
145145

146146
def make_async_execute(
147147
connection: Engine,
148-
) -> Callable[
149-
[VarArg(Tuple[Any, ...]), KwArg(Dict[str, Any])], Coroutine[Any, Any, ResultProxy]
150-
]:
148+
) -> Callable[[VarArg(Any), KwArg(Any)], Coroutine[Any, Any, ResultProxy]]:
151149
"""We need an async function to patch database.execute() with
152150
but connection.execute() is synchronous so make a wrapper for it."""
153151

154-
async def async_execute(
155-
*args: Tuple[Any, ...], **kwargs: Dict[str, Any]
156-
) -> ResultProxy:
152+
async def async_execute(*args: Any, **kwargs: Any) -> ResultProxy:
157153
"""An async wrapper around connection.execute()."""
158154
return connection.execute(*args, **kwargs) # type: ignore
159155

0 commit comments

Comments
 (0)