From b7c262523bb0441e356d08997e8def7f51bc240a Mon Sep 17 00:00:00 2001 From: Rebecca Chen Date: Tue, 18 Sep 2018 04:54:56 -0700 Subject: [PATCH] Fix the Python 2 signature of tempfile._TemporaryFileWrapper.write. (#2465) --- stdlib/2/tempfile.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/2/tempfile.pyi b/stdlib/2/tempfile.pyi index c19dbf179..bad5b837a 100644 --- a/stdlib/2/tempfile.pyi +++ b/stdlib/2/tempfile.pyi @@ -1,4 +1,4 @@ -from typing import Tuple, IO, Union, AnyStr, Any, overload, Iterator, List, Iterable, Optional +from typing import Any, AnyStr, IO, Iterable, Iterator, List, Optional, overload, Text, Tuple, Union from thread import LockType from random import Random @@ -45,7 +45,7 @@ class _TemporaryFileWrapper(IO[str]): def tell(self) -> int: ... def truncate(self, size: Optional[int] = ...) -> int: ... def writable(self) -> bool: ... - def write(self, s: str) -> int: ... + def write(self, s: Text) -> int: ... def writelines(self, lines: Iterable[str]) -> None: ...