Format: application/octet-stream
1 from typing import IO, Any, Union
2
3 import _io
4 from _io import (
5 DEFAULT_BUFFER_SIZE as DEFAULT_BUFFER_SIZE,
6 BlockingIOError as BlockingIOError,
7 BufferedRandom as BufferedRandom,
8 BufferedReader as BufferedReader,
9 BufferedRWPair as BufferedRWPair,
10 BufferedWriter as BufferedWriter,
11 BytesIO as BytesIO,
12 FileIO as FileIO,
13 IncrementalNewlineDecoder as IncrementalNewlineDecoder,
14 StringIO as StringIO,
15 TextIOWrapper as TextIOWrapper,
16 UnsupportedOperation as UnsupportedOperation,
17 open as open,
18 )
19
20 def _OpenWrapper(
21 file: Union[str, unicode, int],
22 mode: unicode = ...,
23 buffering: int = ...,
24 encoding: unicode = ...,
25 errors: unicode = ...,
26 newline: unicode = ...,
27 closefd: bool = ...,
28 ) -> IO[Any]: ...
29
30 SEEK_SET: int
31 SEEK_CUR: int
32 SEEK_END: int
33
34 class IOBase(_io._IOBase): ...
35 class RawIOBase(_io._RawIOBase, IOBase): ...
36 class BufferedIOBase(_io._BufferedIOBase, IOBase): ...
37
38 # Note: In the actual io.py, TextIOBase subclasses IOBase.
39 # (Which we don't do here because we don't want to subclass both TextIO and BinaryIO.)
40 class TextIOBase(_io._TextIOBase): ...
41