From c6bb8a7c883bfbca99e17b5cd92aad98bb63f5f6 Mon Sep 17 00:00:00 2001 From: Ashwini Chaudhary Date: Sun, 6 Aug 2017 20:51:09 +0530 Subject: [PATCH] Added stub for chunk(py 2 and 3) (#1523) --- stdlib/2and3/chunk.pyi | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 stdlib/2and3/chunk.pyi diff --git a/stdlib/2and3/chunk.pyi b/stdlib/2and3/chunk.pyi new file mode 100644 index 000000000..79255c22f --- /dev/null +++ b/stdlib/2and3/chunk.pyi @@ -0,0 +1,23 @@ +# Source(py2): https://hg.python.org/cpython/file/2.7/Lib/chunk.py +# Source(py3): https://github.com/python/cpython/blob/master/Lib/chunk.py + +from typing import IO + +class Chunk: + closed = ... # type: bool + align = ... # type: bool + file = ... # type: IO[bytes] + chunkname = ... # type: bytes + chunksize = ... # type: int + size_read = ... # type: int + offset = ... # type: int + seekable = ... # type: bool + def __init__(self, file: IO[bytes], align: bool = ..., bigendian: bool = ..., inclheader: bool = ...) -> None: ... + def getname(self) -> bytes: ... + def getsize(self) -> int: ... + def close(self) -> None: ... + def isatty(self) -> bool: ... + def seek(self, pos: int, whence: int = ...) -> None: ... + def tell(self) -> int: ... + def read(self, size: int = ...) -> bytes: ... + def skip(self) -> None: ...