From d4c13e73f9af69864099e55252e0f2966574511c Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Mon, 12 Jun 2017 15:36:47 -0700 Subject: [PATCH] gzip.GzipFile.__init__ accepts any Text for 'mode' (#1403) --- stdlib/2/gzip.pyi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stdlib/2/gzip.pyi b/stdlib/2/gzip.pyi index 82ed482d9..3177bbaf9 100644 --- a/stdlib/2/gzip.pyi +++ b/stdlib/2/gzip.pyi @@ -1,4 +1,4 @@ -from typing import Any, IO +from typing import Any, IO, Text import io class GzipFile(io.BufferedIOBase): @@ -14,7 +14,7 @@ class GzipFile(io.BufferedIOBase): fileobj = ... # type: Any offset = ... # type: Any mtime = ... # type: Any - def __init__(self, filename: str = ..., mode: str = ..., compresslevel: int = ..., + def __init__(self, filename: str = ..., mode: Text = ..., compresslevel: int = ..., fileobj: IO[str] = ..., mtime: float = ...) -> None: ... @property def filename(self): ... @@ -34,4 +34,4 @@ class GzipFile(io.BufferedIOBase): def seek(self, offset, whence=...): ... def readline(self, size=...): ... -def open(filename: str, mode: str = ..., compresslevel: int = ...) -> GzipFile: ... +def open(filename: str, mode: Text = ..., compresslevel: int = ...) -> GzipFile: ...