Files
typeshed/stdlib/asyncio/threads.pyi
Thomas Grainger eced701c8b add ParamSpec to asyncio.to_thread (#6668)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2021-12-23 13:29:02 +02:00

10 lines
259 B
Python

import sys
from typing import Callable, TypeVar
from typing_extensions import ParamSpec
_P = ParamSpec("_P")
_R = TypeVar("_R")
if sys.version_info >= (3, 9):
async def to_thread(__func: Callable[_P, _R], *args: _P.args, **kwargs: _P.kwargs) -> _R: ...