File: _io.pyi

package info (click to toggle)
mypy 0.470-complete-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 5,864 kB
  • ctags: 3,264
  • sloc: python: 21,838; makefile: 18
file content (107 lines) | stat: -rw-r--r-- 3,492 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
from typing import Any, Optional, Iterable, Tuple, List, Union

DEFAULT_BUFFER_SIZE = ...  # type: int


class BlockingIOError(IOError):
    characters_written = ...  # type: int

class UnsupportedOperation(ValueError, IOError): ...


class _IOBase(object):
    closed = ...  # type: bool
    def __enter__(self) -> "_IOBase": ...
    def __exit__(self, type, value, traceback) -> bool: ...
    def __iter__(self) -> "_IOBase": ...
    def _checkClosed(self) -> None: ...
    def _checkReadable(self) -> None: ...
    def _checkSeekable(self) -> None: ...
    def _checkWritable(self) -> None: ...
    def close(self) -> None: ...
    def fileno(self) -> int: ...
    def flush(self) -> None: ...
    def isatty(self) -> bool: ...
    def next(self) -> str: ...
    def readable(self) -> bool: ...
    def readline(self, limit: int = ...) -> str: ...
    def readlines(self, hint: int = ...) -> List[str]: ...
    def seek(self, offset: int, whence: int = ...) -> None: ...
    def seekable(self) -> bool: ...
    def tell(self) -> int: ...
    def truncate(self, size: int = ...) -> int: ...
    def writable(self) -> bool: ...
    def writelines(self, lines: Iterable[str]) -> None: ...

class _BufferedIOBase(_IOBase):
    def read1(self, n: int) -> str: ...
    def read(self, n: int = ...) -> str: ...
    def readinto(self, buffer: bytearray) -> int: ...
    def write(self, s: str) -> int: ...
    def detach(self) -> "_BufferedIOBase": ...

class BufferedRWPair(_BufferedIOBase):
    def peek(self, n: int = ...) -> str: ...

class BufferedRandom(_BufferedIOBase):
    name = ...  # type: str
    raw = ...  # type: _IOBase
    mode = ...  # type: str
    def peek(self, n: int = ...) -> str: ...

class BufferedReader(_BufferedIOBase):
    name = ...  # type: str
    raw = ...  # type: _IOBase
    mode = ...  # type: str
    def peek(self, n: int = ...) -> str: ...

class BufferedWriter(_BufferedIOBase):
    name = ...  # type: str
    raw = ...  # type: _IOBase
    mode = ...  # type: str

class BytesIO(_BufferedIOBase):
    def __setstate__(self, tuple) -> None: ...
    def __getstate__(self) -> tuple: ...
    def getvalue(self) -> str: ...

class _RawIOBase(_IOBase):
    def readall(self) -> str: ...
    def read(self, n: int = ...) -> str: ...

class FileIO(_RawIOBase):
    mode = ...  # type: str
    closefd = ...  # type: bool
    def readinto(self, buffer: bytearray)-> int: ...
    def write(self, pbuf: str) -> int: ...

class IncrementalNewlineDecoder(object):
    newlines = ...  # type: Union[str, unicode]
    def decode(self, input, final) -> Any: ...
    def getstate(self) -> Tuple[Any, int]: ...
    def setstate(self, state: Tuple[Any, int]) -> None: ...
    def reset(self) -> None: ...

class _TextIOBase(_IOBase):
    errors = ...  # type: Optional[str]
    newlines = ...  # type: Union[str, unicode]
    encoding = ...  # type: Optional[str]
    def read(self, n: int = ...) -> str: ...
    def write(self) -> None:
        raise UnsupportedOperation
    def detach(self) -> None:
        raise UnsupportedOperation

class StringIO(_TextIOBase):
    line_buffering = ...  # type: bool
    def getvalue(self) -> str: ...
    def __setstate__(self, state: tuple) -> None: ...
    def __getstate__(self) -> tuple: ...

class TextIOWrapper(_TextIOBase):
    name = ...  # type: str
    line_buffering = ...  # type: bool
    buffer = ...  # type: str
    _CHUNK_SIZE = ...  # type: int

def open(file: Union[int, str], mode: str = ...) -> _IOBase: ...