mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-14 15:57:08 +08:00
better stubs
This commit is contained in:
@@ -1,10 +1,5 @@
|
||||
# Stubs for django.utils.archive (Python 3.6)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
from typing import Any, Iterator, List, Optional, Tuple, Union
|
||||
|
||||
from typing import Any
|
||||
|
||||
from typing import List, Tuple, Type, Union
|
||||
|
||||
class ArchiveException(Exception): ...
|
||||
class UnrecognizedArchiveFormat(ArchiveException): ...
|
||||
@@ -12,33 +7,32 @@ class UnrecognizedArchiveFormat(ArchiveException): ...
|
||||
def extract(path: str, to_path: str = ...) -> None: ...
|
||||
|
||||
class Archive:
|
||||
_archive: Any = ...
|
||||
def __init__(self, file: str) -> None: ...
|
||||
@staticmethod
|
||||
def _archive_cls(file: str) -> Type[BaseArchive]: ...
|
||||
def __enter__(self) -> Archive: ...
|
||||
def __exit__(self, exc_type: None, exc_value: None, traceback: None) -> None: ...
|
||||
def __exit__(
|
||||
self, exc_type: None, exc_value: None, traceback: None
|
||||
) -> None: ...
|
||||
def extract(self, to_path: str = ...) -> None: ...
|
||||
def list(self) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
|
||||
class BaseArchive:
|
||||
@staticmethod
|
||||
def _copy_permissions(mode: int, filename: str) -> None: ...
|
||||
def split_leading_dir(self, path: str) -> Union[List[str], Tuple[str, str]]: ...
|
||||
def has_leading_dir(self, paths: List[str]) -> bool: ...
|
||||
def split_leading_dir(
|
||||
self, path: str
|
||||
) -> Union[Tuple[str, str], List[str]]: ...
|
||||
def has_leading_dir(
|
||||
self, paths: Union[Iterator[Any], List[str]]
|
||||
) -> bool: ...
|
||||
def extract(self) -> None: ...
|
||||
def list(self) -> None: ...
|
||||
|
||||
class TarArchive(BaseArchive):
|
||||
_archive: Any = ...
|
||||
def __init__(self, file: str) -> None: ...
|
||||
def list(self, *args: Any, **kwargs: Any) -> None: ...
|
||||
def extract(self, to_path: str) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
|
||||
class ZipArchive(BaseArchive):
|
||||
_archive: Any = ...
|
||||
def __init__(self, file: str) -> None: ...
|
||||
def list(self, *args: Any, **kwargs: Any) -> None: ...
|
||||
def extract(self, to_path: str) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user