From 20363a7dc45807a80385b65e2a4efc9f6dbc0808 Mon Sep 17 00:00:00 2001 From: Ryan Morshead Date: Sun, 6 Oct 2019 00:53:16 -0700 Subject: [PATCH 1/2] add IncrementalNewlineDecoder constructor IncrementalNewlineDecoder defined a new constructor because it wraps other decoders. See: https://github.com/python/cpython/blob/65dcc8a8dc41d3453fd6b987073a5f1b30c5c0fd/Lib/_pyio.py#L1886 --- stdlib/3/io.pyi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stdlib/3/io.pyi b/stdlib/3/io.pyi index 22a8784a755e..a64155af76b8 100644 --- a/stdlib/3/io.pyi +++ b/stdlib/3/io.pyi @@ -206,4 +206,6 @@ class StringIO(TextIOWrapper): def __enter__(self) -> StringIO: ... class IncrementalNewlineDecoder(codecs.IncrementalDecoder): + def __init__(self, decoder: Optional[codecs.IncrementalDecoder], + translate: bool, errors: str = 'strict') -> None: ... def decode(self, input: bytes, final: bool = ...) -> str: ... From 672aa78414879a5d568ee3df03705cb22826f9d5 Mon Sep 17 00:00:00 2001 From: Ryan Morshead Date: Sun, 6 Oct 2019 03:17:01 -0700 Subject: [PATCH 2/2] Use ellipses as default values --- 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 a64155af76b8..47f8db71ba86 100644 --- a/stdlib/3/io.pyi +++ b/stdlib/3/io.pyi @@ -207,5 +207,5 @@ class StringIO(TextIOWrapper): class IncrementalNewlineDecoder(codecs.IncrementalDecoder): def __init__(self, decoder: Optional[codecs.IncrementalDecoder], - translate: bool, errors: str = 'strict') -> None: ... + translate: bool, errors: str = ...) -> None: ... def decode(self, input: bytes, final: bool = ...) -> str: ...