mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
clean python 3 specific stuff from stdlib/@python2 stubs (#5451)
This commit is contained in:
@@ -234,10 +234,7 @@ class StreamReaderWriter(TextIO):
|
||||
def read(self, size: int = ...) -> _Decoded: ...
|
||||
def readline(self, size: Optional[int] = ...) -> _Decoded: ...
|
||||
def readlines(self, sizehint: Optional[int] = ...) -> List[_Decoded]: ...
|
||||
if sys.version_info >= (3,):
|
||||
def __next__(self) -> Text: ...
|
||||
else:
|
||||
def next(self) -> Text: ...
|
||||
def next(self) -> Text: ...
|
||||
def __iter__(self: _T) -> _T: ...
|
||||
# This actually returns None, but that's incompatible with the supertype
|
||||
def write(self, data: _Decoded) -> int: ...
|
||||
@@ -277,10 +274,7 @@ class StreamRecoder(BinaryIO):
|
||||
def read(self, size: int = ...) -> bytes: ...
|
||||
def readline(self, size: Optional[int] = ...) -> bytes: ...
|
||||
def readlines(self, sizehint: Optional[int] = ...) -> List[bytes]: ...
|
||||
if sys.version_info >= (3,):
|
||||
def __next__(self) -> bytes: ...
|
||||
else:
|
||||
def next(self) -> bytes: ...
|
||||
def next(self) -> bytes: ...
|
||||
def __iter__(self: _SRT) -> _SRT: ...
|
||||
def write(self, data: bytes) -> int: ...
|
||||
def writelines(self, list: Iterable[bytes]) -> int: ... # type: ignore # it's supposed to return None
|
||||
|
||||
Reference in New Issue
Block a user