From b96bd698abba552b761a34e374ebf1ba2acc4c3f Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Thu, 19 Jan 2017 12:21:51 -0800 Subject: [PATCH] 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. --- stdlib/3/typing.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/3/typing.pyi b/stdlib/3/typing.pyi index cf9211bd9..c4018938f 100644 --- a/stdlib/3/typing.pyi +++ b/stdlib/3/typing.pyi @@ -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]': ...