clean python 3 specific stuff from stdlib/@python2 stubs (#5451)

This commit is contained in:
Akuli
2021-05-15 01:19:05 +03:00
committed by GitHub
parent f94d838814
commit 5ec4f06263
121 changed files with 1024 additions and 4801 deletions

View File

@@ -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