From af222eace0f6cceb9698e14721b6572376a85f3d Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Mon, 20 Mar 2017 20:07:58 -0700 Subject: [PATCH] add stubs for zipapp (#1046) * add zipapp * add BinaryIO to _Path --- stdlib/3.5/zipapp.pyi | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 stdlib/3.5/zipapp.pyi diff --git a/stdlib/3.5/zipapp.pyi b/stdlib/3.5/zipapp.pyi new file mode 100644 index 000000000..9fac5a026 --- /dev/null +++ b/stdlib/3.5/zipapp.pyi @@ -0,0 +1,11 @@ +# Stubs for zipapp (Python 3.5+) + +from pathlib import Path +from typing import BinaryIO, Optional, Union + +_Path = Union[str, Path, BinaryIO] + +class ZipAppError(Exception): ... + +def create_archive(source: _Path, target: Optional[_Path] = ..., interpreter: Optional[str] = ..., main: Optional[str] = ...) -> None: ... +def get_interpreter(archive: _Path) -> str: ...