mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-07-14 04:14:52 +08:00
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 <>
This commit is contained in:
co-authored by
hauntsaninja <>
parent
111f3f02ef
commit
e0f9242e76
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user