|
1 | 1 | # pylint: disable=redefined-outer-name,
|
2 | 2 | import random
|
3 | 3 | 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 |
5 | 5 | from unittest.mock import AsyncMock
|
6 | 6 | from uuid import UUID
|
7 | 7 |
|
@@ -145,15 +145,11 @@ async def create_subscription(
|
145 | 145 |
|
146 | 146 | def make_async_execute(
|
147 | 147 | 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]]: |
151 | 149 | """We need an async function to patch database.execute() with
|
152 | 150 | but connection.execute() is synchronous so make a wrapper for it."""
|
153 | 151 |
|
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: |
157 | 153 | """An async wrapper around connection.execute()."""
|
158 | 154 | return connection.execute(*args, **kwargs) # type: ignore
|
159 | 155 |
|
|
0 commit comments