mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-30 08:04:24 +08:00
io: minor fixes for arguments (#3642)
This commit is contained in:
committed by
Sebastian Rittau
parent
ed95668638
commit
d5851eca6f
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user