mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-11 06:21:58 +08:00
make pep561 compliant
This commit is contained in:
38
django-stubs/utils/archive.pyi
Normal file
38
django-stubs/utils/archive.pyi
Normal file
@@ -0,0 +1,38 @@
|
||||
from typing import (
|
||||
List,
|
||||
Tuple,
|
||||
Type,
|
||||
Union,
|
||||
)
|
||||
|
||||
|
||||
def extract(path: str, to_path: str = ...) -> None: ...
|
||||
|
||||
|
||||
class Archive:
|
||||
def __enter__(self) -> Archive: ...
|
||||
def __exit__(self, exc_type: None, exc_value: None, traceback: None) -> None: ...
|
||||
def __init__(self, file: str) -> None: ...
|
||||
@staticmethod
|
||||
def _archive_cls(file: str) -> Type[BaseArchive]: ...
|
||||
def close(self) -> None: ...
|
||||
def extract(self, to_path: str = ...) -> None: ...
|
||||
|
||||
|
||||
class BaseArchive:
|
||||
@staticmethod
|
||||
def _copy_permissions(mode: int, filename: str) -> None: ...
|
||||
def has_leading_dir(self, paths: List[str]) -> bool: ...
|
||||
def split_leading_dir(self, path: str) -> Union[List[str], Tuple[str, str]]: ...
|
||||
|
||||
|
||||
class TarArchive:
|
||||
def __init__(self, file: str) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def extract(self, to_path: str) -> None: ...
|
||||
|
||||
|
||||
class ZipArchive:
|
||||
def __init__(self, file: str) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def extract(self, to_path: str) -> None: ...
|
||||
Reference in New Issue
Block a user