Python 2: io.IOBase.readline accepts None (#7041)

This commit is contained in:
Tom Parker-Shemilt
2022-01-26 09:32:20 +00:00
committed by GitHub
parent 9651f6fa04
commit 01510448a9

View File

@@ -35,7 +35,7 @@ class _IOBase(BinaryIO):
# The parameter type of writelines[s]() is determined by that of write():
def writelines(self, lines: Iterable[bytes]) -> None: ...
# The return type of readline[s]() and next() is determined by that of read():
def readline(self, limit: int = ...) -> bytes: ...
def readline(self, limit: int | None = ...) -> bytes: ...
def readlines(self, hint: int = ...) -> list[bytes]: ...
def next(self) -> bytes: ...
# These don't actually exist but we need to pretend that it does