Skip to content

Commit b96bd69

Browse files
JelleZijlstragvanrossum
authored andcommitted
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.
1 parent df9d11b commit b96bd69

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/3/typing.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,10 @@ if sys.version_info >= (3, 6):
161161

162162
@abstractmethod
163163
def athrow(self, typ: Type[BaseException], val: Optional[BaseException] = None,
164-
tb: Any = None) -> Awaitable[None]: ...
164+
tb: Any = None) -> Awaitable[_T_co]: ...
165165

166166
@abstractmethod
167-
def aclose(self) -> Awaitable[None]: ...
167+
def aclose(self) -> Awaitable[_T_co]: ...
168168

169169
@abstractmethod
170170
def __aiter__(self) -> 'AsyncGenerator[_T_co, _T_contra]': ...

0 commit comments

Comments
 (0)