Fix return values of athrow and aclose. (#845)

I misread the PEP here (https://www.python.org/dev/peps/pep-0525/#asynchronous-generator-object); both of these return the yielded type.
This commit is contained in:
Jelle Zijlstra
2017-01-19 12:21:51 -08:00
committed by Guido van Rossum
parent df9d11bf71
commit b96bd698ab

View File

@@ -161,10 +161,10 @@ if sys.version_info >= (3, 6):
@abstractmethod
def athrow(self, typ: Type[BaseException], val: Optional[BaseException] = None,
tb: Any = None) -> Awaitable[None]: ...
tb: Any = None) -> Awaitable[_T_co]: ...
@abstractmethod
def aclose(self) -> Awaitable[None]: ...
def aclose(self) -> Awaitable[_T_co]: ...
@abstractmethod
def __aiter__(self) -> 'AsyncGenerator[_T_co, _T_contra]': ...