mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
fix asyncio.BaseEventLoop.create_task for >=3.5 (#1272)
* fix python/typeshed#1202 asyncio.BaseEventLoop.create_task for >=3.5 * remove unnecessary version distinction
This commit is contained in:
committed by
Jelle Zijlstra
parent
d7d27647a9
commit
d68d0c5c00
@@ -76,7 +76,7 @@ class AbstractEventLoop(metaclass=ABCMeta):
|
||||
def create_future(self) -> Future[Any]: ...
|
||||
# Tasks methods
|
||||
@abstractmethod
|
||||
def create_task(self, coro: Union[Future[_T], Generator[Any, None, _T]]) -> Task[_T]: ...
|
||||
def create_task(self, coro: Union[Awaitable[_T], Generator[Any, None, _T]]) -> Task[_T]: ...
|
||||
@abstractmethod
|
||||
def set_task_factory(self, factory: Optional[Callable[[AbstractEventLoop, Generator[Any, None, _T]], Future[_T]]]) -> None: ...
|
||||
@abstractmethod
|
||||
|
||||
Reference in New Issue
Block a user