Skip to content

Commit d4c13e7

Browse files
matthiaskrammgvanrossum
authored andcommitted
gzip.GzipFile.__init__ accepts any Text for 'mode' (#1403)
1 parent 8f47637 commit d4c13e7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

stdlib/2/gzip.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any, IO
1+
from typing import Any, IO, Text
22
import io
33

44
class GzipFile(io.BufferedIOBase):
@@ -14,7 +14,7 @@ class GzipFile(io.BufferedIOBase):
1414
fileobj = ... # type: Any
1515
offset = ... # type: Any
1616
mtime = ... # type: Any
17-
def __init__(self, filename: str = ..., mode: str = ..., compresslevel: int = ...,
17+
def __init__(self, filename: str = ..., mode: Text = ..., compresslevel: int = ...,
1818
fileobj: IO[str] = ..., mtime: float = ...) -> None: ...
1919
@property
2020
def filename(self): ...
@@ -34,4 +34,4 @@ class GzipFile(io.BufferedIOBase):
3434
def seek(self, offset, whence=...): ...
3535
def readline(self, size=...): ...
3636

37-
def open(filename: str, mode: str = ..., compresslevel: int = ...) -> GzipFile: ...
37+
def open(filename: str, mode: Text = ..., compresslevel: int = ...) -> GzipFile: ...

0 commit comments

Comments
 (0)