mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-23 20:31:32 +08:00
fix using ZipFile as a ContextManager (#2043)
This commit is contained in:
committed by
Łukasz Langa
parent
b8b78886e3
commit
37aba00fe8
@@ -1,5 +1,5 @@
|
||||
from typing import (
|
||||
List, BinaryIO, TextIO, Iterator, Union, Optional, Callable, Tuple, Any, IO, Iterable
|
||||
List, BinaryIO, TextIO, Iterator, Union, Optional, Callable, Tuple, Type, Any, IO, Iterable
|
||||
)
|
||||
import builtins
|
||||
import codecs
|
||||
@@ -32,7 +32,7 @@ class IOBase:
|
||||
def __iter__(self) -> Iterator[bytes]: ...
|
||||
def __next__(self) -> bytes: ...
|
||||
def __enter__(self: _T) -> _T: ...
|
||||
def __exit__(self, exc_type: Optional[type], exc_val: Optional[Exception],
|
||||
def __exit__(self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException],
|
||||
exc_tb: Optional[TracebackType]) -> bool: ...
|
||||
def close(self) -> None: ...
|
||||
def fileno(self) -> int: ...
|
||||
@@ -109,8 +109,8 @@ class BytesIO(BinaryIO):
|
||||
def __iter__(self) -> Iterator[bytes]: ...
|
||||
def __next__(self) -> bytes: ...
|
||||
def __enter__(self) -> 'BytesIO': ...
|
||||
def __exit__(self, t: Optional[type] = ..., value: Optional[BaseException] = ...,
|
||||
traceback: Optional[Any] = ...) -> bool: ...
|
||||
def __exit__(self, t: Optional[Type[BaseException]] = ..., value: Optional[BaseException] = ...,
|
||||
traceback: Optional[TracebackType] = ...) -> bool: ...
|
||||
def close(self) -> None: ...
|
||||
def fileno(self) -> int: ...
|
||||
def flush(self) -> None: ...
|
||||
@@ -212,8 +212,8 @@ class TextIOWrapper(TextIO):
|
||||
write_through: bool = ...
|
||||
) -> None: ...
|
||||
# copied from IOBase
|
||||
def __exit__(self, t: Optional[type] = ..., value: Optional[BaseException] = ...,
|
||||
traceback: Optional[Any] = ...) -> bool: ...
|
||||
def __exit__(self, t: Optional[Type[BaseException]] = ..., value: Optional[BaseException] = ...,
|
||||
traceback: Optional[TracebackType] = ...) -> bool: ...
|
||||
def close(self) -> None: ...
|
||||
def fileno(self) -> int: ...
|
||||
def flush(self) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user