io: minor fixes for arguments (#3642)

This commit is contained in:
Shantanu
2020-01-24 00:22:19 -08:00
committed by Sebastian Rittau
parent ed95668638
commit d5851eca6f

View File

@@ -3,6 +3,7 @@ from typing import (
)
import builtins
import codecs
import sys
from mmap import mmap
from types import TracebackType
from typing import TypeVar
@@ -102,7 +103,7 @@ class BytesIO(BinaryIO):
# TODO should be the next line instead
# def writelines(self, lines: List[Union[bytes, bytearray]]) -> None: ...
def writelines(self, lines: Any) -> None: ...
def readline(self, size: int = ...) -> bytes: ...
def readline(self, __size: Optional[int] = ...) -> bytes: ...
def __del__(self) -> None: ...
closed: bool
# copied from BufferedIOBase
@@ -111,7 +112,10 @@ class BytesIO(BinaryIO):
def write(self, b: Union[bytes, bytearray]) -> int: ...
def readinto1(self, b: _bytearray_like) -> int: ...
def read(self, size: Optional[int] = ...) -> bytes: ...
def read1(self, size: int = ...) -> bytes: ...
if sys.version_info >= (3, 7):
def read1(self, __size: Optional[int] = ...) -> bytes: ...
else:
def read1(self, __size: Optional[int]) -> bytes: ...
class BufferedReader(BufferedIOBase):
def __init__(self, raw: RawIOBase, buffer_size: int = ...) -> None: ...