From e0f9242e76fa7850d3379b58c149bb1fbce39053 Mon Sep 17 00:00:00 2001 From: Shantanu Date: Tue, 12 May 2020 18:33:48 -0700 Subject: [PATCH] io: StringIO seems happy enough to take None (#3973) Didn't check C code, but the _pyio implementation explicitly checks for None Co-authored-by: hauntsaninja <> --- 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 efc77b970..1f3ca4973 100644 --- a/stdlib/3/io.pyi +++ b/stdlib/3/io.pyi @@ -203,7 +203,7 @@ class TextIOWrapper(TextIO): def tell(self) -> int: ... class StringIO(TextIOWrapper): - def __init__(self, initial_value: str = ..., + def __init__(self, initial_value: Optional[str] = ..., newline: Optional[str] = ...) -> None: ... # StringIO does not contain a "name" field. This workaround is necessary # to allow StringIO sub-classes to add this field, as it is defined