Use ParamSpec in unittest.async_case (#7011)

This commit is contained in:
Nikita Sobolev
2022-01-24 00:54:06 +03:00
committed by GitHub
parent 166d6c618c
commit dc176d70ec

View File

@@ -1,8 +1,11 @@
from typing import Any, Awaitable, Callable
from typing import Awaitable, Callable
from typing_extensions import ParamSpec
from .case import TestCase
_P = ParamSpec("_P")
class IsolatedAsyncioTestCase(TestCase):
async def asyncSetUp(self) -> None: ...
async def asyncTearDown(self) -> None: ...
def addAsyncCleanup(self, __func: Callable[..., Awaitable[Any]], *args: Any, **kwargs: Any) -> None: ...
def addAsyncCleanup(self, __func: Callable[_P, Awaitable[object]], *args: _P.args, **kwargs: _P.kwargs) -> None: ...