From 50ed690dff102b1d895296a16d27b020bff96848 Mon Sep 17 00:00:00 2001 From: Stephen Morton Date: Mon, 21 Oct 2024 17:16:42 -0700 Subject: [PATCH] remove false inheritance from io.IncrementalNewlineDecoder related to https://github.com/python/typeshed/issues/3968 --- stdlib/_io.pyi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stdlib/_io.pyi b/stdlib/_io.pyi index e8290daad106..8ec10a0b232c 100644 --- a/stdlib/_io.pyi +++ b/stdlib/_io.pyi @@ -181,11 +181,13 @@ class StringIO(TextIOWrapper, TextIOBase, _TextIOBase): # type: ignore[misc] # name: Any def getvalue(self) -> str: ... -class IncrementalNewlineDecoder(codecs.IncrementalDecoder): +class IncrementalNewlineDecoder: def __init__(self, decoder: codecs.IncrementalDecoder | None, translate: bool, errors: str = ...) -> None: ... def decode(self, input: ReadableBuffer | str, final: bool = False) -> str: ... @property def newlines(self) -> str | tuple[str, ...] | None: ... + def getstate(self) -> tuple[bytes, int]: ... + def reset(self) -> None: ... def setstate(self, state: tuple[bytes, int], /) -> None: ... if sys.version_info >= (3, 10):