mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-20 19:01:15 +08:00
a better definition for io.IOBase (#1160)
* a better definition for io.IOBase * move BinaryIO superclass into _io._IOBase * remove write() from _TextIOBase
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
# Only a subset of functionality is included.
|
||||
|
||||
from typing import List, BinaryIO, TextIO, IO, overload, Iterator, Iterable, Any, Union, Optional
|
||||
import _io
|
||||
|
||||
DEFAULT_BUFFER_SIZE = 0
|
||||
|
||||
@@ -13,9 +14,7 @@ def open(file: Union[str, unicode, int],
|
||||
errors: unicode = ..., newline: unicode = ...,
|
||||
closefd: bool = ...) -> IO[Any]: ...
|
||||
|
||||
class IOBase:
|
||||
# TODO
|
||||
...
|
||||
class IOBase(_io._IOBase): ...
|
||||
|
||||
class BytesIO(BinaryIO):
|
||||
def __init__(self, initial_bytes: str = ...) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user