From 3743b64b072330279c98a9280c1e3c3651585074 Mon Sep 17 00:00:00 2001 From: Ryan Morshead Date: Sun, 6 Oct 2019 02:33:26 -0700 Subject: [PATCH] IncrementalNewlineDecoder.decode accepts str (#3312) The decode method of IncrementalNewlineDecoder accepts a string when its decoder is None. --- stdlib/3/io.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/3/io.pyi b/stdlib/3/io.pyi index 22a8784a7..ab32adc5f 100644 --- a/stdlib/3/io.pyi +++ b/stdlib/3/io.pyi @@ -206,4 +206,4 @@ class StringIO(TextIOWrapper): def __enter__(self) -> StringIO: ... class IncrementalNewlineDecoder(codecs.IncrementalDecoder): - def decode(self, input: bytes, final: bool = ...) -> str: ... + def decode(self, input: Union[bytes, str], final: bool = ...) -> str: ...