mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-03 18:13:36 +08:00
Fix type hint of generator throw method (#4253)
* Fix type hint of generator throw method * Incorporated changes from #4252
This commit is contained in:
@@ -89,11 +89,13 @@ class GeneratorType:
|
||||
def __iter__(self) -> GeneratorType: ...
|
||||
def close(self) -> None: ...
|
||||
def next(self) -> Any: ...
|
||||
def send(self, arg: Any) -> Any: ...
|
||||
def send(self, __arg: Any) -> Any: ...
|
||||
@overload
|
||||
def throw(self, val: BaseException) -> Any: ...
|
||||
def throw(self, __typ: Type[BaseException], __val: Union[BaseException, object] = ...,
|
||||
__tb: Optional[TracebackType] = ...) -> Any: ...
|
||||
@overload
|
||||
def throw(self, typ: type, val: BaseException = ..., tb: TracebackType = ...) -> Any: ...
|
||||
def throw(self, __typ: BaseException, __val: None = ...,
|
||||
__tb: Optional[TracebackType] = ...) -> Any: ...
|
||||
|
||||
class ClassType: ...
|
||||
class UnboundMethodType:
|
||||
|
||||
Reference in New Issue
Block a user