mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-09 21:12:25 +08:00
more 3.7 features (#2015)
This commit is contained in:
committed by
Guido van Rossum
parent
ce0656a8c7
commit
7cfbc7d17f
@@ -1,11 +1,16 @@
|
||||
# Stubs for zipapp (Python 3.5+)
|
||||
|
||||
from pathlib import Path
|
||||
from typing import BinaryIO, Optional, Union
|
||||
import sys
|
||||
from typing import BinaryIO, Callable, 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: ...
|
||||
if sys.version_info >= (3, 7):
|
||||
def create_archive(source: _Path, target: Optional[_Path] = ..., interpreter: Optional[str] = ..., main: Optional[str] = ...,
|
||||
filter: Optional[Callable[[Path], bool]] = ..., compressed: bool = ...) -> None: ...
|
||||
else:
|
||||
def create_archive(source: _Path, target: Optional[_Path] = ..., interpreter: Optional[str] = ..., main: Optional[str] = ...) -> None: ...
|
||||
def get_interpreter(archive: _Path) -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user