mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-18 09:55:59 +08:00
gzip.GzipFile.__init__ accepts any Text for 'mode' (#1403)
This commit is contained in:
committed by
Guido van Rossum
parent
8f476378e0
commit
d4c13e73f9
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user