From 9fa161fe516fafb272b2c7d66bb8d1c94ae02c5e Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Sun, 10 Apr 2016 20:23:06 -0400 Subject: [PATCH] Stubgen gzip (and _compression) --- stdlib/3/_compression.pyi | 20 +++++++++++++++ stdlib/3/gzip.pyi | 51 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 stdlib/3/_compression.pyi create mode 100644 stdlib/3/gzip.pyi diff --git a/stdlib/3/_compression.pyi b/stdlib/3/_compression.pyi new file mode 100644 index 000000000..16893b914 --- /dev/null +++ b/stdlib/3/_compression.pyi @@ -0,0 +1,20 @@ +# Stubs for _compression (Python 3.5) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +import io + +BUFFER_SIZE = ... # type: Any + +class BaseStream(io.BufferedIOBase): ... + +class DecompressReader(io.RawIOBase): + def readable(self): ... + def __init__(self, fp, decomp_factory, trailing_error=..., **decomp_args): ... + def close(self): ... + def seekable(self): ... + def readinto(self, b): ... + def read(self, size=-1): ... + def seek(self, offset, whence=...): ... + def tell(self): ... diff --git a/stdlib/3/gzip.pyi b/stdlib/3/gzip.pyi new file mode 100644 index 000000000..9d771fc63 --- /dev/null +++ b/stdlib/3/gzip.pyi @@ -0,0 +1,51 @@ +# Stubs for gzip (Python 3.5) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +import _compression + +def open(filename, mode='', compresslevel=9, encoding=None, errors=None, newline=None): ... + +class _PaddedFile: + file = ... # type: Any + def __init__(self, f, prepend=b''): ... + def read(self, size): ... + def prepend(self, prepend=b''): ... + def seek(self, off): ... + def seekable(self): ... + +class GzipFile(_compression.BaseStream): + myfileobj = ... # type: Any + mode = ... # type: Any + name = ... # type: Any + compress = ... # type: Any + fileobj = ... # type: Any + def __init__(self, filename=None, mode=None, compresslevel=9, fileobj=None, mtime=None): ... + @property + def filename(self): ... + @property + def mtime(self): ... + crc = ... # type: Any + def write(self, data): ... + def read(self, size=-1): ... + def read1(self, size=-1): ... + def peek(self, n): ... + @property + def closed(self): ... + def close(self): ... + def flush(self, zlib_mode=...): ... + def fileno(self): ... + def rewind(self): ... + def readable(self): ... + def writable(self): ... + def seekable(self): ... + def seek(self, offset, whence=...): ... + def readline(self, size=-1): ... + +class _GzipReader(_compression.DecompressReader): + def __init__(self, fp): ... + def read(self, size=-1): ... + +def compress(data, compresslevel=9): ... +def decompress(data): ...