From 87eb55a0aaeef1cfa8af5a2caa65b4c061864119 Mon Sep 17 00:00:00 2001 From: Ryan Morshead Date: Sun, 6 Oct 2019 01:00:02 -0700 Subject: [PATCH] IncrementalNewlineDecoder.decode accepts bytes The decode method of IncrementalNewlineDecoder accepts a string when its decoder is None Related: https://github.com/python/typeshed/pull/3311 --- 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 22a8784a755e..ab32adc5f6dc 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: ...