move generated stubs to separate directory, too messty

This commit is contained in:
Maxim Kurnikov
2018-11-10 17:49:18 +03:00
parent 7436d641e3
commit 96cd3ddb27
446 changed files with 58 additions and 71 deletions

View File

@@ -0,0 +1,16 @@
from typing import Any, Optional
from django.apps import AppConfig
class StaticFilesConfig(AppConfig):
apps: None
label: str
models: None
models_module: None
module: Any
path: str
name: str = ...
verbose_name: Any = ...
ignore_patterns: Any = ...
def ready(self) -> None: ...

View File

@@ -0,0 +1,6 @@
from typing import Any, List, Optional
from django.core.checks.messages import Error
def check_finders(app_configs: None = ..., **kwargs: Any) -> List[Error]: ...

View File

@@ -0,0 +1,62 @@
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: ...

View File

@@ -0,0 +1,16 @@
from typing import Any, Optional
from django.core.handlers.wsgi import WSGIHandler, WSGIRequest
class StaticFilesHandler(WSGIHandler):
handles_files: bool = ...
application: django.core.handlers.wsgi.WSGIHandler = ...
base_url: Any = ...
def __init__(self, application: WSGIHandler) -> None: ...
def load_middleware(self) -> None: ...
def get_base_url(self) -> str: ...
def file_path(self, url: str) -> str: ...
def serve(self, request: WSGIRequest) -> Any: ...
def get_response(self, request: WSGIRequest) -> Any: ...
def __call__(self, environ: Any, start_response: Any): ...

View File

@@ -0,0 +1,42 @@
from typing import Any, Dict, List, Optional
from django.core.files.storage import FileSystemStorage
from django.core.management.base import BaseCommand, CommandParser
class Command(BaseCommand):
stderr: django.core.management.base.OutputWrapper
stdout: django.core.management.base.OutputWrapper
help: str = ...
requires_system_checks: bool = ...
copied_files: Any = ...
symlinked_files: Any = ...
unmodified_files: Any = ...
post_processed_files: Any = ...
storage: Any = ...
style: django.core.management.color.Style = ...
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def local(self) -> bool: ...
def add_arguments(self, parser: CommandParser) -> None: ...
interactive: Any = ...
verbosity: Any = ...
symlink: Any = ...
clear: Any = ...
dry_run: Any = ...
ignore_patterns: Any = ...
post_process: Any = ...
def set_options(self, **options: Any) -> None: ...
def collect(self) -> Dict[str, List[str]]: ...
def handle(self, **options: Any) -> Optional[str]: ...
def log(self, msg: str, level: int = ...) -> None: ...
def is_local_storage(self) -> bool: ...
def clear_dir(self, path: str) -> None: ...
def delete_file(
self, path: str, prefixed_path: str, source_storage: FileSystemStorage
) -> bool: ...
def link_file(
self, path: str, prefixed_path: str, source_storage: FileSystemStorage
) -> None: ...
def copy_file(
self, path: str, prefixed_path: str, source_storage: FileSystemStorage
) -> None: ...

View File

@@ -0,0 +1,13 @@
from typing import Any, Optional
from django.core.management.base import CommandParser, LabelCommand
class Command(LabelCommand):
stderr: django.core.management.base.OutputWrapper
stdout: django.core.management.base.OutputWrapper
style: django.core.management.color.Style
help: str = ...
label: str = ...
def add_arguments(self, parser: CommandParser) -> None: ...
def handle_label(self, path: str, **options: Any) -> str: ...

View File

@@ -0,0 +1,15 @@
from typing import Any, Optional
from django.contrib.staticfiles.handlers import StaticFilesHandler
from django.core.management.base import CommandParser
from django.core.management.commands.runserver import \
Command as RunserverCommand
class Command(RunserverCommand):
stderr: django.core.management.base.OutputWrapper
stdout: django.core.management.base.OutputWrapper
style: django.core.management.color.Style
help: str = ...
def add_arguments(self, parser: CommandParser) -> None: ...
def get_handler(self, *args: Any, **options: Any) -> StaticFilesHandler: ...

View File

@@ -0,0 +1,76 @@
from collections import OrderedDict
from typing import Any, Callable, Iterator, Optional, Tuple
from django.core.files.base import File
from django.core.files.storage import FileSystemStorage
from django.utils.functional import LazyObject
from django.utils.safestring import SafeText
class StaticFilesStorage(FileSystemStorage):
base_location: Any = ...
location: Any = ...
def __init__(
self,
location: Optional[str] = ...,
base_url: None = ...,
*args: Any,
**kwargs: Any
) -> None: ...
def path(self, name: str) -> str: ...
class HashedFilesMixin:
default_template: str = ...
max_post_process_passes: int = ...
patterns: Any = ...
hashed_files: Any = ...
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def file_hash(self, name: str, content: File = ...) -> str: ...
def hashed_name(
self,
name: str,
content: Optional[File] = ...,
filename: Optional[str] = ...,
) -> str: ...
def url(self, name: SafeText, force: bool = ...) -> str: ...
def url_converter(
self, name: str, hashed_files: OrderedDict, template: str = ...
) -> Callable: ...
def post_process(
self, paths: OrderedDict, dry_run: bool = ..., **options: Any
) -> Iterator[Tuple[str, str, bool]]: ...
def clean_name(self, name: str) -> str: ...
def hash_key(self, name: str) -> str: ...
def stored_name(self, name: str) -> str: ...
class ManifestFilesMixin(HashedFilesMixin):
manifest_version: str = ...
manifest_name: str = ...
manifest_strict: bool = ...
hashed_files: Any = ...
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def read_manifest(self) -> Any: ...
def load_manifest(self) -> OrderedDict: ...
def post_process(self, *args: Any, **kwargs: Any) -> None: ...
def save_manifest(self) -> None: ...
def stored_name(self, name: str) -> str: ...
class _MappingCache:
cache: django.core.cache.DefaultCacheProxy = ...
def __init__(self, cache: Any) -> None: ...
def __setitem__(self, key: Any, value: Any) -> None: ...
def __getitem__(self, key: Any): ...
def clear(self) -> None: ...
def update(self, data: Any) -> None: ...
def get(self, key: Any, default: Optional[Any] = ...): ...
class CachedFilesMixin(HashedFilesMixin):
hashed_files: Any = ...
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def hash_key(self, name: str) -> str: ...
class CachedStaticFilesStorage(CachedFilesMixin, StaticFilesStorage): ...
class ManifestStaticFilesStorage(ManifestFilesMixin, StaticFilesStorage): ...
class ConfiguredStorage(LazyObject): ...
staticfiles_storage: Any

View File

@@ -0,0 +1,9 @@
from typing import Any, Optional
from django.template.base import Parser, Token
from django.templatetags.static import StaticNode
register: Any
def static(path: str) -> str: ...
def do_static(parser: Parser, token: Token) -> StaticNode: ...

View File

@@ -0,0 +1,7 @@
from typing import Any, List, Optional
from django.urls.resolvers import URLPattern
urlpatterns: Any
def staticfiles_urlpatterns(prefix: None = ...) -> List[URLPattern]: ...

View File

@@ -0,0 +1,15 @@
from collections import OrderedDict
from typing import Any, Iterator, List, Optional, Tuple, Union
from django.core.files.storage import FileSystemStorage
def matches_patterns(
path: str, patterns: Union[List[str], Tuple[str], OrderedDict] = ...
) -> bool: ...
def get_files(
storage: FileSystemStorage,
ignore_patterns: List[str] = ...,
location: str = ...,
) -> Iterator[str]: ...
def check_settings(base_url: Optional[str] = ...) -> None: ...

View File

@@ -0,0 +1,9 @@
from typing import Any, Optional
from django.core.handlers.wsgi import WSGIRequest
from django.http.response import FileResponse
def serve(
request: WSGIRequest, path: str, insecure: bool = ..., **kwargs: Any
) -> FileResponse: ...