massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / stdlib / 2and3 / bz2.pyi
diff --git a/.config/coc/extensions/coc-python-data/languageServer.0.5.59/Typeshed/stdlib/2and3/bz2.pyi b/.config/coc/extensions/coc-python-data/languageServer.0.5.59/Typeshed/stdlib/2and3/bz2.pyi
new file mode 100644 (file)
index 0000000..ee23df2
--- /dev/null
@@ -0,0 +1,48 @@
+import io\r
+import sys\r
+from typing import Any, IO, Optional, Union\r
+\r
+if sys.version_info >= (3, 6):\r
+    from os import PathLike\r
+    _PathOrFile = Union[str, bytes, IO[Any], PathLike[Any]]\r
+elif sys.version_info >= (3, 3):\r
+    _PathOrFile = Union[str, bytes, IO[Any]]\r
+else:\r
+    _PathOrFile = str\r
+\r
+def compress(data: bytes, compresslevel: int = ...) -> bytes: ...\r
+def decompress(data: bytes) -> bytes: ...\r
+\r
+if sys.version_info >= (3, 3):\r
+    def open(filename: _PathOrFile,\r
+             mode: str = ...,\r
+             compresslevel: int = ...,\r
+             encoding: Optional[str] = ...,\r
+             errors: Optional[str] = ...,\r
+             newline: Optional[str] = ...) -> IO[Any]: ...\r
+\r
+class BZ2File(io.BufferedIOBase, IO[bytes]):  # type: ignore  # python/mypy#5027\r
+    def __init__(self,\r
+                 filename: _PathOrFile,\r
+                 mode: str = ...,\r
+                 buffering: Optional[Any] = ...,\r
+                 compresslevel: int = ...) -> None: ...\r
+\r
+class BZ2Compressor(object):\r
+    def __init__(self, compresslevel: int = ...) -> None: ...\r
+    def compress(self, data: bytes) -> bytes: ...\r
+    def flush(self) -> bytes: ...\r
+\r
+class BZ2Decompressor(object):\r
+    if sys.version_info >= (3, 5):\r
+        def decompress(self, data: bytes, max_length: int = ...) -> bytes: ...\r
+    else:\r
+        def decompress(self, data: bytes) -> bytes: ...\r
+    if sys.version_info >= (3, 3):\r
+        @property\r
+        def eof(self) -> bool: ...\r
+    if sys.version_info >= (3, 5):\r
+        @property\r
+        def needs_input(self) -> bool: ...\r
+    @property\r
+    def unused_data(self) -> bytes: ...\r