mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
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:
committed by
Guido van Rossum
parent
df9d11bf71
commit
b96bd698ab
@@ -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]': ...
|
||||
|
||||
Reference in New Issue
Block a user