Skip to content

Commit d7765c6

Browse files
fix safe_task type hint for Python 3.8
1 parent e983bd0 commit d7765c6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

elasticsearch/compat.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ def run() -> None:
106106

107107

108108
@asynccontextmanager
109-
async def safe_task(coro: Coroutine[Any, Any, Any]) -> AsyncIterator[asyncio.Task[Any]]:
109+
async def safe_task(
110+
coro: Coroutine[Any, Any, Any],
111+
) -> "AsyncIterator[asyncio.Task[Any]]":
110112
"""Run a background task within a context manager block.
111113
112114
The task is awaited when the block ends.

0 commit comments

Comments
 (0)