mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-30 08:04:24 +08:00
committed by
Łukasz Langa
parent
1515ed9f88
commit
ac651d2f8c
@@ -116,9 +116,8 @@ class Generator(Iterator[_T_co], Generic[_T_co, _T_contra, _V_co]):
|
||||
def send(self, value: _T_contra) -> _T_co: ...
|
||||
|
||||
@abstractmethod
|
||||
def throw(self, typ: Type[BaseException], val: Optional[BaseException] = None,
|
||||
# TODO: tb should be TracebackType but that's defined in types
|
||||
tb: Any = None) -> None: ...
|
||||
def throw(self, typ: Type[BaseException], val: Optional[BaseException] = ...,
|
||||
tb: Optional[TracebackType] = ...) -> None: ...
|
||||
|
||||
@abstractmethod
|
||||
def close(self) -> None: ...
|
||||
@@ -144,9 +143,8 @@ class Coroutine(Awaitable[_V_co], Generic[_T_co, _T_contra, _V_co]):
|
||||
def send(self, value: _T_contra) -> _T_co: ...
|
||||
|
||||
@abstractmethod
|
||||
def throw(self, typ: Type[BaseException], val: Optional[BaseException] = None,
|
||||
# TODO: tb should be TracebackType but that's defined in types
|
||||
tb: Any = None) -> None: ...
|
||||
def throw(self, typ: Type[BaseException], val: Optional[BaseException] = ...,
|
||||
tb: Optional[TracebackType] = ...) -> None: ...
|
||||
|
||||
@abstractmethod
|
||||
def close(self) -> None: ...
|
||||
@@ -399,8 +397,7 @@ class IO(Iterator[AnyStr], Generic[AnyStr]):
|
||||
def __enter__(self) -> 'IO[AnyStr]': ...
|
||||
@abstractmethod
|
||||
def __exit__(self, t: Optional[Type[BaseException]], value: Optional[BaseException],
|
||||
# TODO: traceback should be TracebackType but that's defined in types
|
||||
traceback: Optional[Any]) -> bool: ...
|
||||
traceback: Optional[TracebackType]) -> bool: ...
|
||||
|
||||
class BinaryIO(IO[bytes]):
|
||||
# TODO readinto
|
||||
|
||||
Reference in New Issue
Block a user