Add Async classes to typing stub.

This commit is contained in:
Roy Williams
2015-12-01 11:38:01 -08:00
parent 30af935dc7
commit 7f22db0492
2 changed files with 31 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
from typing import Any, TypeVar, List, Callable, Tuple, Union, Dict
from typing import Any, Awaitable, TypeVar, List, Callable, Tuple, Union, Dict
from abc import ABCMeta, abstractmethod
from asyncio.futures import Future
@@ -34,7 +34,7 @@ class AbstractEventLoop(metaclass=ABCMeta):
@abstractmethod
def run_forever(self) -> None: ...
@abstractmethod
def run_until_complete(self, future: Future[_T]) -> _T: ...
def run_until_complete(self, future: Union[Awaitable[_T], Future[_T]]) -> _T: ...
@abstractmethod
def stop(self) -> None: ...
@abstractmethod