mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-07 20:54:29 +08:00
46 lines
2.1 KiB
Python
46 lines
2.1 KiB
Python
from typing import Any, Iterator, List, Optional, Tuple, Union
|
|
|
|
from django.contrib.staticfiles.storage import StaticFilesStorage
|
|
from django.core.checks.messages import Error
|
|
from django.core.files.storage import DefaultStorage, FileSystemStorage
|
|
|
|
searched_locations: Any
|
|
|
|
class BaseFinder:
|
|
def check(self, **kwargs: Any) -> Any: ...
|
|
def find(self, path: Any, all: bool = ...) -> None: ...
|
|
def list(self, ignore_patterns: Any) -> None: ...
|
|
|
|
class FileSystemFinder(BaseFinder):
|
|
locations: List[Any] = ...
|
|
storages: collections.OrderedDict = ...
|
|
def __init__(self, app_names: None = ..., *args: Any, **kwargs: Any) -> None: ...
|
|
def check(self, **kwargs: Any) -> List[Error]: ...
|
|
def find(self, path: str, all: bool = ...) -> Union[List[str], str]: ...
|
|
def find_location(self, root: str, path: str, prefix: str = ...) -> Optional[str]: ...
|
|
def list(self, ignore_patterns: List[str]) -> Iterator[Tuple[str, FileSystemStorage]]: ...
|
|
|
|
class AppDirectoriesFinder(BaseFinder):
|
|
storage_class: Any = ...
|
|
source_dir: str = ...
|
|
apps: List[str] = ...
|
|
storages: collections.OrderedDict = ...
|
|
def __init__(self, app_names: None = ..., *args: Any, **kwargs: Any) -> None: ...
|
|
def list(self, ignore_patterns: List[str]) -> Iterator[Tuple[str, FileSystemStorage]]: ...
|
|
def find(self, path: str, all: bool = ...) -> Union[List[str], str]: ...
|
|
def find_in_app(self, app: str, path: str) -> Optional[str]: ...
|
|
|
|
class BaseStorageFinder(BaseFinder):
|
|
storage: Any = ...
|
|
def __init__(self, storage: Optional[StaticFilesStorage] = ..., *args: Any, **kwargs: Any) -> None: ...
|
|
def find(self, path: str, all: bool = ...) -> Union[List[str], str]: ...
|
|
def list(self, ignore_patterns: List[str]) -> Iterator[Tuple[str, DefaultStorage]]: ...
|
|
|
|
class DefaultStorageFinder(BaseStorageFinder):
|
|
storage: django.contrib.staticfiles.storage.StaticFilesStorage = ...
|
|
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
|
|
|
def find(path: str, all: bool = ...) -> Optional[Union[List[str], str]]: ...
|
|
def get_finders() -> Iterator[BaseFinder]: ...
|
|
def get_finder(import_path: str) -> BaseFinder: ...
|