diff --git a/django-stubs-generated/__init__.pyi b/django-stubs-generated/__init__.pyi deleted file mode 100644 index b0aa111..0000000 --- a/django-stubs-generated/__init__.pyi +++ /dev/null @@ -1,5 +0,0 @@ -from typing import Any - -VERSION: Any - -def setup(set_prefix: bool = ...) -> None: ... diff --git a/django-stubs-generated/core/__init__.pyi b/django-stubs-generated/core/__init__.pyi deleted file mode 100644 index e69de29..0000000 diff --git a/django-stubs-generated/core/cache/__init__.pyi b/django-stubs-generated/core/cache/__init__.pyi deleted file mode 100644 index 1e431c9..0000000 --- a/django-stubs-generated/core/cache/__init__.pyi +++ /dev/null @@ -1,21 +0,0 @@ -from collections import OrderedDict -from typing import Any, Callable, Dict, Union - -from django.core.cache.backends.base import BaseCache as BaseCache - -DEFAULT_CACHE_ALIAS: str - -class CacheHandler: - def __init__(self) -> None: ... - def __getitem__(self, alias: str) -> BaseCache: ... - def all(self): ... - -class DefaultCacheProxy: - def __getattr__(self, name: str) -> Union[Callable, Dict[str, float], OrderedDict, int]: ... - def __setattr__(self, name: str, value: Callable) -> None: ... - def __delattr__(self, name: Any): ... - def __contains__(self, key: str) -> bool: ... - def __eq__(self, other: Any): ... - -cache: Any -caches: CacheHandler diff --git a/django-stubs-generated/core/cache/backends/__init__.pyi b/django-stubs-generated/core/cache/backends/__init__.pyi deleted file mode 100644 index e69de29..0000000 diff --git a/django-stubs-generated/core/cache/backends/base.pyi b/django-stubs-generated/core/cache/backends/base.pyi deleted file mode 100644 index 29aede9..0000000 --- a/django-stubs-generated/core/cache/backends/base.pyi +++ /dev/null @@ -1,47 +0,0 @@ -from collections import OrderedDict -from typing import Any, Callable, Dict, List, Optional, Union - -from django.core.exceptions import ImproperlyConfigured - -class InvalidCacheBackendError(ImproperlyConfigured): ... -class CacheKeyWarning(RuntimeWarning): ... - -DEFAULT_TIMEOUT: Any -MEMCACHE_MAX_KEY_LENGTH: int - -def default_key_func(key: Union[int, str], key_prefix: str, version: Union[int, str]) -> str: ... -def get_key_func(key_func: Optional[Union[Callable, str]]) -> Callable: ... - -class BaseCache: - default_timeout: int = ... - key_prefix: str = ... - version: int = ... - key_func: Callable = ... - def __init__(self, params: Dict[str, Optional[Union[Callable, Dict[str, int], int, str]]]) -> None: ... - def get_backend_timeout(self, timeout: Any = ...) -> Optional[float]: ... - def make_key(self, key: Union[int, str], version: Optional[Union[int, str]] = ...) -> str: ... - def add(self, key: Any, value: Any, timeout: Any = ..., version: Optional[Any] = ...) -> None: ... - def get(self, key: Any, default: Optional[Any] = ..., version: Optional[Any] = ...) -> None: ... - def set(self, key: Any, value: Any, timeout: Any = ..., version: Optional[Any] = ...) -> None: ... - def touch(self, key: Any, timeout: Any = ..., version: Optional[Any] = ...) -> None: ... - def delete(self, key: Any, version: Optional[Any] = ...) -> None: ... - def get_many(self, keys: List[str], version: Optional[int] = ...) -> Dict[str, Union[int, str]]: ... - def get_or_set( - self, key: str, default: Optional[Union[Callable, int, str]], timeout: Any = ..., version: Optional[int] = ... - ) -> Optional[Union[int, str]]: ... - def has_key(self, key: Any, version: Optional[Any] = ...): ... - def incr(self, key: str, delta: int = ..., version: Optional[int] = ...) -> int: ... - def decr(self, key: str, delta: int = ..., version: Optional[int] = ...) -> int: ... - def __contains__(self, key: str) -> bool: ... - def set_many( - self, - data: Union[Dict[str, bytes], Dict[str, int], Dict[str, str], OrderedDict], - timeout: Any = ..., - version: Optional[Union[int, str]] = ..., - ) -> List[Any]: ... - def delete_many(self, keys: Union[Dict[str, str], List[str]], version: None = ...) -> None: ... - def clear(self) -> None: ... - def validate_key(self, key: str) -> None: ... - def incr_version(self, key: str, delta: int = ..., version: Optional[int] = ...) -> int: ... - def decr_version(self, key: str, delta: int = ..., version: Optional[int] = ...) -> int: ... - def close(self, **kwargs: Any) -> None: ... diff --git a/django-stubs-generated/core/cache/backends/db.pyi b/django-stubs-generated/core/cache/backends/db.pyi deleted file mode 100644 index f20e31a..0000000 --- a/django-stubs-generated/core/cache/backends/db.pyi +++ /dev/null @@ -1,39 +0,0 @@ -from typing import Any, Callable, Dict, Optional, Union - -from django.core.cache.backends.base import BaseCache - -class Options: - db_table: str = ... - app_label: str = ... - model_name: str = ... - verbose_name: str = ... - verbose_name_plural: str = ... - object_name: str = ... - abstract: bool = ... - managed: bool = ... - proxy: bool = ... - swapped: bool = ... - def __init__(self, table: str) -> None: ... - -class BaseDatabaseCache(BaseCache): - default_timeout: int - key_func: Callable - key_prefix: str - version: int - cache_model_class: Any = ... - def __init__(self, table: str, params: Dict[str, Union[Callable, Dict[str, int], int, str]]) -> None: ... - -class DatabaseCache(BaseDatabaseCache): - default_timeout: int - key_func: Callable - key_prefix: str - version: int - def get(self, key: str, default: Optional[Union[int, str]] = ..., version: Optional[int] = ...) -> Any: ... - def set(self, key: str, value: Any, timeout: Any = ..., version: Optional[int] = ...) -> None: ... - def add( - self, key: str, value: Union[Dict[str, int], bytes, int, str], timeout: Any = ..., version: Optional[int] = ... - ) -> bool: ... - def touch(self, key: str, timeout: Any = ..., version: None = ...) -> bool: ... - def delete(self, key: str, version: Optional[int] = ...) -> None: ... - def has_key(self, key: str, version: Optional[int] = ...) -> Any: ... - def clear(self) -> None: ... diff --git a/django-stubs-generated/core/cache/backends/dummy.pyi b/django-stubs-generated/core/cache/backends/dummy.pyi deleted file mode 100644 index 78ec150..0000000 --- a/django-stubs-generated/core/cache/backends/dummy.pyi +++ /dev/null @@ -1,19 +0,0 @@ -from typing import Any, Dict, Optional, Union - -from django.core.cache.backends.base import BaseCache - -class DummyCache(BaseCache): - default_timeout: int - key_func: Callable - key_prefix: str - version: int - def __init__(self, host: str, *args: Any, **kwargs: Any) -> None: ... - def add(self, key: str, value: str, timeout: Any = ..., version: None = ...) -> bool: ... - def get(self, key: str, default: Optional[str] = ..., version: Optional[int] = ...) -> Optional[str]: ... - def set( - self, key: str, value: Union[Dict[str, Any], int, str], timeout: Any = ..., version: Optional[str] = ... - ) -> None: ... - def touch(self, key: str, timeout: Any = ..., version: None = ...) -> bool: ... - def delete(self, key: str, version: None = ...) -> None: ... - def has_key(self, key: str, version: None = ...) -> bool: ... - def clear(self) -> None: ... diff --git a/django-stubs-generated/core/cache/backends/filebased.pyi b/django-stubs-generated/core/cache/backends/filebased.pyi deleted file mode 100644 index 8a01b34..0000000 --- a/django-stubs-generated/core/cache/backends/filebased.pyi +++ /dev/null @@ -1,22 +0,0 @@ -from typing import Any, Callable, Dict, Optional, Union - -from django.core.cache.backends.base import BaseCache - -class FileBasedCache(BaseCache): - default_timeout: int - key_func: Callable - key_prefix: str - version: int - cache_suffix: str = ... - def __init__(self, dir: str, params: Dict[str, Union[Callable, Dict[str, int], int, str]]) -> None: ... - def add( - self, key: str, value: Union[Dict[str, int], bytes, int, str], timeout: Any = ..., version: Optional[int] = ... - ) -> bool: ... - def get( - self, key: str, default: Optional[Union[int, str]] = ..., version: Optional[int] = ... - ) -> Optional[str]: ... - def set(self, key: str, value: Any, timeout: Any = ..., version: Optional[int] = ...) -> None: ... - def touch(self, key: str, timeout: Any = ..., version: None = ...) -> bool: ... - def delete(self, key: str, version: Optional[int] = ...) -> None: ... - def has_key(self, key: str, version: Optional[int] = ...) -> bool: ... - def clear(self) -> None: ... diff --git a/django-stubs-generated/core/cache/backends/locmem.pyi b/django-stubs-generated/core/cache/backends/locmem.pyi deleted file mode 100644 index 8c32dca..0000000 --- a/django-stubs-generated/core/cache/backends/locmem.pyi +++ /dev/null @@ -1,26 +0,0 @@ -from typing import Any, Callable, Dict, Optional, Union - -from django.core.cache.backends.base import BaseCache - -class LocMemCache(BaseCache): - default_timeout: int - key_func: Callable - key_prefix: str - version: int - def __init__(self, name: str, params: Dict[str, Optional[Union[Callable, Dict[str, int], int, str]]]) -> None: ... - def add( - self, - key: str, - value: Union[Dict[str, int], Dict[str, str], bytes, int, str], - timeout: Any = ..., - version: Optional[int] = ..., - ) -> Any: ... - def get( - self, key: Union[int, str], default: Optional[Union[int, str]] = ..., version: Optional[int] = ... - ) -> Any: ... - def set(self, key: Union[int, str], value: Any, timeout: Any = ..., version: Optional[int] = ...) -> None: ... - def touch(self, key: str, timeout: Any = ..., version: None = ...) -> Any: ... - def incr(self, key: Union[int, str], delta: int = ..., version: Optional[int] = ...) -> int: ... - def has_key(self, key: str, version: Optional[int] = ...) -> Any: ... - def delete(self, key: str, version: Optional[int] = ...) -> None: ... - def clear(self) -> None: ... diff --git a/django-stubs-generated/core/cache/utils.pyi b/django-stubs-generated/core/cache/utils.pyi deleted file mode 100644 index ea5d6e5..0000000 --- a/django-stubs-generated/core/cache/utils.pyi +++ /dev/null @@ -1,5 +0,0 @@ -from typing import Any, List, Optional, Union - -TEMPLATE_FRAGMENT_KEY_TEMPLATE: str - -def make_template_fragment_key(fragment_name: str, vary_on: Optional[Union[List[int], List[str]]] = ...) -> str: ... diff --git a/django-stubs-generated/core/checks/__init__.pyi b/django-stubs-generated/core/checks/__init__.pyi deleted file mode 100644 index e69de29..0000000 diff --git a/django-stubs-generated/core/checks/caches.pyi b/django-stubs-generated/core/checks/caches.pyi deleted file mode 100644 index ddc5c91..0000000 --- a/django-stubs-generated/core/checks/caches.pyi +++ /dev/null @@ -1,7 +0,0 @@ -from typing import Any, List, Optional - -from django.core.checks.messages import Error - -E001: Any - -def check_default_cache_is_configured(app_configs: None, **kwargs: Any) -> List[Error]: ... diff --git a/django-stubs-generated/core/checks/database.pyi b/django-stubs-generated/core/checks/database.pyi deleted file mode 100644 index a3167ff..0000000 --- a/django-stubs-generated/core/checks/database.pyi +++ /dev/null @@ -1,3 +0,0 @@ -from typing import Any, List, Optional - -def check_database_backends(*args: Any, **kwargs: Any) -> List[Any]: ... diff --git a/django-stubs-generated/core/checks/messages.pyi b/django-stubs-generated/core/checks/messages.pyi deleted file mode 100644 index a66acf9..0000000 --- a/django-stubs-generated/core/checks/messages.pyi +++ /dev/null @@ -1,45 +0,0 @@ -from typing import Any, Optional, Union - -DEBUG: int -INFO: int -WARNING: int -ERROR: int -CRITICAL: int - -class CheckMessage: - level: Any = ... - msg: Any = ... - hint: Any = ... - obj: Any = ... - id: Any = ... - def __init__( - self, level: int, msg: str, hint: Optional[str] = ..., obj: Any = ..., id: Optional[str] = ... - ) -> None: ... - def __eq__(self, other: Union[CheckMessage, str]) -> bool: ... - def is_serious(self, level: int = ...) -> bool: ... - def is_silenced(self) -> bool: ... - -class Debug(CheckMessage): - def __init__(self, *args: Any, **kwargs: Any) -> None: ... - -class Info(CheckMessage): - def __init__(self, *args: Any, **kwargs: Any) -> None: ... - -class Warning(CheckMessage): - hint: str - id: str - level: int - msg: str - obj: Any - def __init__(self, *args: Any, **kwargs: Any) -> None: ... - -class Error(CheckMessage): - hint: None - id: str - level: int - msg: str - obj: Any - def __init__(self, *args: Any, **kwargs: Any) -> None: ... - -class Critical(CheckMessage): - def __init__(self, *args: Any, **kwargs: Any) -> None: ... diff --git a/django-stubs-generated/core/checks/model_checks.pyi b/django-stubs-generated/core/checks/model_checks.pyi deleted file mode 100644 index 23fd841..0000000 --- a/django-stubs-generated/core/checks/model_checks.pyi +++ /dev/null @@ -1,6 +0,0 @@ -from typing import Any, List, Optional - -from django.core.checks.messages import Warning - -def check_all_models(app_configs: None = ..., **kwargs: Any) -> List[Warning]: ... -def check_lazy_references(app_configs: None = ..., **kwargs: Any) -> List[Any]: ... diff --git a/django-stubs-generated/core/checks/registry.pyi b/django-stubs-generated/core/checks/registry.pyi deleted file mode 100644 index cfb6667..0000000 --- a/django-stubs-generated/core/checks/registry.pyi +++ /dev/null @@ -1,35 +0,0 @@ -from typing import Any, Callable, List, Optional, Set, Union - -from django.apps.config import AppConfig -from django.core.checks.messages import CheckMessage - -class Tags: - admin: str = ... - caches: str = ... - compatibility: str = ... - database: str = ... - models: str = ... - security: str = ... - signals: str = ... - templates: str = ... - urls: str = ... - -class CheckRegistry: - registered_checks: Set[Callable] = ... - deployment_checks: Set[Callable] = ... - def __init__(self) -> None: ... - def register(self, check: Optional[Union[Callable, str]] = ..., *tags: Any, **kwargs: Any) -> Callable: ... - def run_checks( - self, - app_configs: Optional[List[AppConfig]] = ..., - tags: Optional[List[str]] = ..., - include_deployment_checks: bool = ..., - ) -> Union[List[CheckMessage], List[int], List[str]]: ... - def tag_exists(self, tag: str, include_deployment_checks: bool = ...) -> bool: ... - def tags_available(self, deployment_checks: bool = ...) -> Set[str]: ... - def get_checks(self, include_deployment_checks: bool = ...) -> List[Callable]: ... - -registry: Any -register: Any -run_checks: Any -tag_exists: Any diff --git a/django-stubs-generated/core/checks/security/__init__.pyi b/django-stubs-generated/core/checks/security/__init__.pyi deleted file mode 100644 index e69de29..0000000 diff --git a/django-stubs-generated/core/checks/security/base.pyi b/django-stubs-generated/core/checks/security/base.pyi deleted file mode 100644 index d66c190..0000000 --- a/django-stubs-generated/core/checks/security/base.pyi +++ /dev/null @@ -1,31 +0,0 @@ -from typing import Any, List, Optional - -from django.core.checks.messages import Warning - -SECRET_KEY_MIN_LENGTH: int -SECRET_KEY_MIN_UNIQUE_CHARACTERS: int -W001: Any -W002: Any -W004: Any -W005: Any -W006: Any -W007: Any -W008: Any -W009: Any -W018: Any -W019: Any -W020: Any -W021: Any - -def check_security_middleware(app_configs: None, **kwargs: Any) -> List[Warning]: ... -def check_xframe_options_middleware(app_configs: None, **kwargs: Any) -> List[Warning]: ... -def check_sts(app_configs: None, **kwargs: Any) -> List[Warning]: ... -def check_sts_include_subdomains(app_configs: None, **kwargs: Any) -> List[Warning]: ... -def check_sts_preload(app_configs: None, **kwargs: Any) -> List[Warning]: ... -def check_content_type_nosniff(app_configs: None, **kwargs: Any) -> List[Warning]: ... -def check_xss_filter(app_configs: None, **kwargs: Any) -> List[Warning]: ... -def check_ssl_redirect(app_configs: None, **kwargs: Any) -> List[Warning]: ... -def check_secret_key(app_configs: None, **kwargs: Any) -> List[Warning]: ... -def check_debug(app_configs: None, **kwargs: Any) -> List[Warning]: ... -def check_xframe_deny(app_configs: None, **kwargs: Any) -> List[Warning]: ... -def check_allowed_hosts(app_configs: None, **kwargs: Any) -> List[Warning]: ... diff --git a/django-stubs-generated/core/checks/security/csrf.pyi b/django-stubs-generated/core/checks/security/csrf.pyi deleted file mode 100644 index b422356..0000000 --- a/django-stubs-generated/core/checks/security/csrf.pyi +++ /dev/null @@ -1,9 +0,0 @@ -from typing import Any, List, Optional - -from django.core.checks.messages import Warning - -W003: Any -W016: Any - -def check_csrf_middleware(app_configs: None, **kwargs: Any) -> List[Warning]: ... -def check_csrf_cookie_secure(app_configs: None, **kwargs: Any) -> List[Warning]: ... diff --git a/django-stubs-generated/core/checks/security/sessions.pyi b/django-stubs-generated/core/checks/security/sessions.pyi deleted file mode 100644 index bd9f8c7..0000000 --- a/django-stubs-generated/core/checks/security/sessions.pyi +++ /dev/null @@ -1,18 +0,0 @@ -from typing import Any, List, Optional - -from django.core.checks.messages import Warning - -def add_session_cookie_message(message: Any): ... - -W010: Any -W011: Any -W012: Any - -def add_httponly_message(message: Any): ... - -W013: Any -W014: Any -W015: Any - -def check_session_cookie_secure(app_configs: None, **kwargs: Any) -> List[Warning]: ... -def check_session_cookie_httponly(app_configs: None, **kwargs: Any) -> List[Warning]: ... diff --git a/django-stubs-generated/core/checks/templates.pyi b/django-stubs-generated/core/checks/templates.pyi deleted file mode 100644 index 3884dad..0000000 --- a/django-stubs-generated/core/checks/templates.pyi +++ /dev/null @@ -1,9 +0,0 @@ -from typing import Any, List, Optional - -from django.core.checks.messages import Error - -E001: Any -E002: Any - -def check_setting_app_dirs_loaders(app_configs: None, **kwargs: Any) -> List[Error]: ... -def check_string_if_invalid_is_string(app_configs: None, **kwargs: Any) -> List[Error]: ... diff --git a/django-stubs-generated/core/checks/urls.pyi b/django-stubs-generated/core/checks/urls.pyi deleted file mode 100644 index b432e17..0000000 --- a/django-stubs-generated/core/checks/urls.pyi +++ /dev/null @@ -1,11 +0,0 @@ -from typing import Any, Callable, List, Optional, Tuple, Union - -from django.core.checks.messages import CheckMessage, Error, Warning -from django.urls.resolvers import URLPattern, URLResolver - -def check_url_config(app_configs: None, **kwargs: Any) -> List[CheckMessage]: ... -def check_resolver(resolver: Union[Tuple[str, Callable], URLPattern, URLResolver]) -> List[CheckMessage]: ... -def check_url_namespaces_unique(app_configs: None, **kwargs: Any) -> List[Warning]: ... -def get_warning_for_invalid_pattern(pattern: Any) -> List[Error]: ... -def check_url_settings(app_configs: None, **kwargs: Any) -> List[Error]: ... -def E006(name: str) -> Error: ... diff --git a/django-stubs-generated/core/exceptions.pyi b/django-stubs-generated/core/exceptions.pyi deleted file mode 100644 index dab34dc..0000000 --- a/django-stubs-generated/core/exceptions.pyi +++ /dev/null @@ -1,58 +0,0 @@ -from typing import Any, Dict, Iterator, List, Optional, Tuple, Type, Union - -from django.db.models.base import Model -from django.forms.utils import ErrorDict, ErrorList - -class FieldDoesNotExist(Exception): ... -class AppRegistryNotReady(Exception): ... - -class ObjectDoesNotExist(Exception): - silent_variable_failure: bool = ... - -class MultipleObjectsReturned(Exception): ... -class SuspiciousOperation(Exception): ... -class SuspiciousMultipartForm(SuspiciousOperation): ... -class SuspiciousFileOperation(SuspiciousOperation): ... -class DisallowedHost(SuspiciousOperation): ... -class DisallowedRedirect(SuspiciousOperation): ... -class TooManyFieldsSent(SuspiciousOperation): ... -class RequestDataTooBig(SuspiciousOperation): ... -class PermissionDenied(Exception): ... -class ViewDoesNotExist(Exception): ... -class MiddlewareNotUsed(Exception): ... -class ImproperlyConfigured(Exception): ... -class FieldError(Exception): ... - -NON_FIELD_ERRORS: str - -class ValidationError(Exception): - error_dict: Any = ... - error_list: Any = ... - message: Any = ... - code: Any = ... - params: Any = ... - def __init__( - self, - message: Union[ - Dict[str, List[ValidationError]], - Dict[str, ErrorList], - List[Union[ValidationError, str]], - ValidationError, - ErrorList, - str, - ], - code: Optional[str] = ..., - params: Optional[ - Union[Dict[str, Union[Tuple[str], Type[Model], Model, str]], Dict[str, Union[int, str]]] - ] = ..., - ) -> None: ... - @property - def message_dict(self) -> Dict[str, List[str]]: ... - @property - def messages(self) -> List[str]: ... - def update_error_dict( - self, error_dict: Union[Dict[str, List[ValidationError]], ErrorDict] - ) -> Union[Dict[str, List[ValidationError]], ErrorDict]: ... - def __iter__(self) -> Iterator[Union[Tuple[str, List[str]], str]]: ... - -class EmptyResultSet(Exception): ... diff --git a/django-stubs-generated/core/files/__init__.pyi b/django-stubs-generated/core/files/__init__.pyi deleted file mode 100644 index e69de29..0000000 diff --git a/django-stubs-generated/core/files/base.pyi b/django-stubs-generated/core/files/base.pyi deleted file mode 100644 index 65da556..0000000 --- a/django-stubs-generated/core/files/base.pyi +++ /dev/null @@ -1,34 +0,0 @@ -from io import BufferedReader, StringIO -from typing import Any, Iterator, Optional, Union - -from django.core.files.utils import FileProxyMixin - -class File(FileProxyMixin): - DEFAULT_CHUNK_SIZE: Any = ... - file: StringIO = ... - name: Optional[str] = ... - mode: str = ... - def __init__(self, file: Any, name: Optional[str] = ...) -> None: ... - def __bool__(self) -> bool: ... - def __len__(self) -> int: ... - def size(self) -> int: ... - def chunks(self, chunk_size: Optional[int] = ...) -> Iterator[Union[bytes, bytearray]]: ... - def multiple_chunks(self, chunk_size: Optional[Any] = ...): ... - def __iter__(self) -> Iterator[Union[bytes, str]]: ... - def __enter__(self) -> File: ... - def __exit__(self, exc_type: None, exc_value: None, tb: None) -> None: ... - def open(self, mode: Optional[str] = ...) -> File: ... - def close(self) -> None: ... - -class ContentFile(File): - file: StringIO - size: Any = ... - def __init__(self, content: Union[bytes, str], name: Optional[str] = ...) -> None: ... - def __bool__(self) -> bool: ... - def open(self, mode: Optional[str] = ...) -> ContentFile: ... - def close(self) -> None: ... - def write(self, data: str) -> int: ... - -def endswith_cr(line: bytes) -> bool: ... -def endswith_lf(line: Union[bytes, str]) -> bool: ... -def equals_lf(line: bytes) -> bool: ... diff --git a/django-stubs-generated/core/files/images.pyi b/django-stubs-generated/core/files/images.pyi deleted file mode 100644 index 36b737f..0000000 --- a/django-stubs-generated/core/files/images.pyi +++ /dev/null @@ -1,15 +0,0 @@ -from io import BufferedReader, BytesIO -from typing import Any, Union - -from django.core.files import File - -class ImageFile(File): - file: BufferedReader - mode: str - name: str - @property - def width(self) -> int: ... - @property - def height(self) -> int: ... - -def get_image_dimensions(file_or_path: Union[BufferedReader, BytesIO, ImageFile, str], close: bool = ...) -> Any: ... diff --git a/django-stubs-generated/core/files/locks.pyi b/django-stubs-generated/core/files/locks.pyi deleted file mode 100644 index e8c6974..0000000 --- a/django-stubs-generated/core/files/locks.pyi +++ /dev/null @@ -1,17 +0,0 @@ -from ctypes import Structure, Union, c_int64, c_ulong, c_void_p -from io import BufferedRandom, TextIOWrapper -from typing import Any, Optional, Union - -LOCK_SH: int -LOCK_NB: int -LOCK_EX: int -ULONG_PTR = c_int64 -ULONG_PTR = c_ulong -PVOID = c_void_p - -class _OFFSET(Structure): ... -class _OFFSET_UNION(Union): ... -class OVERLAPPED(Structure): ... - -def lock(f: Union[BufferedRandom, TextIOWrapper, int], flags: int) -> bool: ... -def unlock(f: Union[BufferedRandom, int]) -> bool: ... diff --git a/django-stubs-generated/core/files/move.pyi b/django-stubs-generated/core/files/move.pyi deleted file mode 100644 index 54236e3..0000000 --- a/django-stubs-generated/core/files/move.pyi +++ /dev/null @@ -1,5 +0,0 @@ -from typing import Any, Optional - -def file_move_safe( - old_file_name: str, new_file_name: str, chunk_size: int = ..., allow_overwrite: bool = ... -) -> None: ... diff --git a/django-stubs-generated/core/files/storage.pyi b/django-stubs-generated/core/files/storage.pyi deleted file mode 100644 index c94131e..0000000 --- a/django-stubs-generated/core/files/storage.pyi +++ /dev/null @@ -1,51 +0,0 @@ -from datetime import datetime -from io import StringIO, TextIOWrapper -from typing import Any, List, Optional, Tuple, Type, Union - -from django.core.files.base import File -from django.utils.functional import LazyObject - -class Storage: - def open(self, name: str, mode: str = ...) -> File: ... - def save( - self, name: Optional[str], content: Union[StringIO, TextIOWrapper, File], max_length: Optional[int] = ... - ) -> str: ... - def get_valid_name(self, name: str) -> str: ... - def get_available_name(self, name: str, max_length: Optional[int] = ...) -> str: ... - def generate_filename(self, filename: str) -> str: ... - def path(self, name: str) -> Any: ... - def delete(self, name: Any) -> None: ... - def exists(self, name: Any) -> None: ... - def listdir(self, path: Any) -> None: ... - def size(self, name: Any) -> None: ... - def url(self, name: Any) -> None: ... - def get_accessed_time(self, name: Any) -> None: ... - def get_created_time(self, name: Any) -> None: ... - def get_modified_time(self, name: Any) -> None: ... - -class FileSystemStorage(Storage): - def __init__( - self, - location: Optional[str] = ..., - base_url: Optional[str] = ..., - file_permissions_mode: Optional[int] = ..., - directory_permissions_mode: Optional[int] = ..., - ) -> None: ... - def base_location(self) -> str: ... - def location(self) -> str: ... - def base_url(self) -> str: ... - def file_permissions_mode(self) -> Optional[int]: ... - def directory_permissions_mode(self) -> Optional[int]: ... - def delete(self, name: str) -> None: ... - def exists(self, name: str) -> bool: ... - def listdir(self, path: str) -> Tuple[List[str], List[str]]: ... - def path(self, name: str) -> str: ... - def size(self, name: str) -> int: ... - def url(self, name: Optional[str]) -> str: ... - def get_accessed_time(self, name: str) -> datetime: ... - def get_created_time(self, name: str) -> datetime: ... - def get_modified_time(self, name: str) -> datetime: ... - -class DefaultStorage(LazyObject): ... - -default_storage: Any diff --git a/django-stubs-generated/core/files/uploadedfile.pyi b/django-stubs-generated/core/files/uploadedfile.pyi deleted file mode 100644 index 2c46eae..0000000 --- a/django-stubs-generated/core/files/uploadedfile.pyi +++ /dev/null @@ -1,59 +0,0 @@ -from io import BytesIO, StringIO -from tempfile import _TemporaryFileWrapper -from typing import Any, Dict, Iterator, Optional, Union - -from django.core.files.base import File - -class UploadedFile(File): - file: None - size: Any = ... - content_type: Any = ... - charset: Any = ... - content_type_extra: Any = ... - def __init__( - self, - file: Optional[Union[BytesIO, StringIO, _TemporaryFileWrapper]] = ..., - name: str = ..., - content_type: str = ..., - size: Optional[int] = ..., - charset: Optional[str] = ..., - content_type_extra: Optional[Dict[str, bytes]] = ..., - ) -> None: ... - name: Any = ... - -class TemporaryUploadedFile(UploadedFile): - file: tempfile._TemporaryFileWrapper - mode: str - def __init__( - self, - name: str, - content_type: str, - size: int, - charset: Optional[str], - content_type_extra: Optional[Dict[Any, Any]] = ..., - ) -> None: ... - def temporary_file_path(self) -> str: ... - def close(self) -> None: ... - -class InMemoryUploadedFile(UploadedFile): - file: _io.StringIO - field_name: Any = ... - def __init__( - self, - file: Union[BytesIO, StringIO], - field_name: Optional[str], - name: str, - content_type: str, - size: int, - charset: Optional[str], - content_type_extra: Optional[Dict[str, bytes]] = ..., - ) -> None: ... - def open(self, mode: Optional[str] = ...) -> InMemoryUploadedFile: ... - def chunks(self, chunk_size: None = ...) -> Iterator[Union[bytes, str]]: ... - def multiple_chunks(self, chunk_size: Optional[Any] = ...): ... - -class SimpleUploadedFile(InMemoryUploadedFile): - file: _io.BytesIO - def __init__(self, name: str, content: Optional[Union[bytes, str]], content_type: str = ...) -> None: ... - @classmethod - def from_dict(cls, file_dict: Any): ... diff --git a/django-stubs-generated/core/files/uploadhandler.pyi b/django-stubs-generated/core/files/uploadhandler.pyi deleted file mode 100644 index 4f46b81..0000000 --- a/django-stubs-generated/core/files/uploadhandler.pyi +++ /dev/null @@ -1,80 +0,0 @@ -from io import BytesIO -from typing import Any, Dict, Optional, Union - -from django.core.files.uploadedfile import InMemoryUploadedFile, TemporaryUploadedFile -from django.core.handlers.wsgi import WSGIRequest - -class UploadFileException(Exception): ... - -class StopUpload(UploadFileException): - connection_reset: bool = ... - def __init__(self, connection_reset: bool = ...) -> None: ... - -class SkipFile(UploadFileException): ... -class StopFutureHandlers(UploadFileException): ... - -class FileUploadHandler: - chunk_size: Any = ... - file_name: Any = ... - content_type: Any = ... - content_length: Any = ... - charset: Any = ... - content_type_extra: Any = ... - request: Any = ... - def __init__(self, request: Optional[WSGIRequest] = ...) -> None: ... - def handle_raw_input( - self, - input_data: Union[BytesIO, WSGIRequest], - META: Dict[str, Any], - content_length: int, - boundary: bytes, - encoding: str = ..., - ) -> None: ... - field_name: Any = ... - def new_file( - self, - field_name: str, - file_name: str, - content_type: str, - content_length: None, - charset: None = ..., - content_type_extra: Dict[str, bytes] = ..., - ) -> None: ... - def receive_data_chunk(self, raw_data: Any, start: Any) -> None: ... - def file_complete(self, file_size: Any) -> None: ... - def upload_complete(self) -> None: ... - -class TemporaryFileUploadHandler(FileUploadHandler): - charset: None - content_length: None - content_type: None - content_type_extra: None - file_name: None - request: django.core.handlers.wsgi.WSGIRequest - file: Any = ... - def new_file(self, *args: Any, **kwargs: Any) -> None: ... - def receive_data_chunk(self, raw_data: bytes, start: int) -> None: ... - def file_complete(self, file_size: int) -> TemporaryUploadedFile: ... - -class MemoryFileUploadHandler(FileUploadHandler): - charset: None - content_length: None - content_type: None - content_type_extra: None - file_name: None - request: django.core.handlers.wsgi.WSGIRequest - activated: Any = ... - def handle_raw_input( - self, - input_data: Union[BytesIO, WSGIRequest], - META: Dict[str, Any], - content_length: int, - boundary: bytes, - encoding: str = ..., - ) -> None: ... - file: Any = ... - def new_file(self, *args: Any, **kwargs: Any) -> None: ... - def receive_data_chunk(self, raw_data: bytes, start: int) -> Optional[bytes]: ... - def file_complete(self, file_size: int) -> Optional[InMemoryUploadedFile]: ... - -def load_handler(path: str, *args: Any, **kwargs: Any) -> FileUploadHandler: ... diff --git a/django-stubs-generated/core/files/utils.pyi b/django-stubs-generated/core/files/utils.pyi deleted file mode 100644 index c94c159..0000000 --- a/django-stubs-generated/core/files/utils.pyi +++ /dev/null @@ -1,23 +0,0 @@ -from typing import Any, Optional - -class FileProxyMixin: - encoding: Any = ... - fileno: Any = ... - flush: Any = ... - isatty: Any = ... - newlines: Any = ... - read: Any = ... - readinto: Any = ... - readline: Any = ... - readlines: Any = ... - seek: Any = ... - tell: Any = ... - truncate: Any = ... - write: Any = ... - writelines: Any = ... - @property - def closed(self) -> bool: ... - def readable(self) -> bool: ... - def writable(self) -> bool: ... - def seekable(self) -> bool: ... - def __iter__(self): ... diff --git a/django-stubs-generated/core/handlers/__init__.pyi b/django-stubs-generated/core/handlers/__init__.pyi deleted file mode 100644 index e69de29..0000000 diff --git a/django-stubs-generated/core/handlers/base.pyi b/django-stubs-generated/core/handlers/base.pyi deleted file mode 100644 index fab82c7..0000000 --- a/django-stubs-generated/core/handlers/base.pyi +++ /dev/null @@ -1,15 +0,0 @@ -from typing import Any, Callable, Optional - -from django.core.handlers.wsgi import WSGIRequest -from django.http.response import HttpResponse, HttpResponseBase - -from .exception import convert_exception_to_response, get_exception_response - -logger: Any - -class BaseHandler: - def load_middleware(self) -> None: ... - def make_view_atomic(self, view: Callable) -> Callable: ... - def get_exception_response(self, request: Any, resolver: Any, status_code: Any, exception: Any): ... - def get_response(self, request: WSGIRequest) -> HttpResponseBase: ... - def process_exception_by_middleware(self, exception: Exception, request: WSGIRequest) -> HttpResponse: ... diff --git a/django-stubs-generated/core/handlers/exception.pyi b/django-stubs-generated/core/handlers/exception.pyi deleted file mode 100644 index 7cf878f..0000000 --- a/django-stubs-generated/core/handlers/exception.pyi +++ /dev/null @@ -1,12 +0,0 @@ -from typing import Any, Callable, Optional - -from django.core.handlers.wsgi import WSGIRequest -from django.http.response import HttpResponse -from django.urls.resolvers import URLResolver - -def convert_exception_to_response(get_response: Callable) -> Callable: ... -def response_for_exception(request: WSGIRequest, exc: Exception) -> HttpResponse: ... -def get_exception_response( - request: WSGIRequest, resolver: URLResolver, status_code: int, exception: Exception, sender: None = ... -) -> HttpResponse: ... -def handle_uncaught_exception(request: Any, resolver: Any, exc_info: Any): ... diff --git a/django-stubs-generated/core/handlers/wsgi.pyi b/django-stubs-generated/core/handlers/wsgi.pyi deleted file mode 100644 index 45d68f7..0000000 --- a/django-stubs-generated/core/handlers/wsgi.pyi +++ /dev/null @@ -1,51 +0,0 @@ -from io import BytesIO -from typing import Any, Callable, Dict, Optional, Union - -from django.contrib.auth.models import AbstractUser -from django.contrib.sessions.backends.base import SessionBase -from django.core.handlers import base -from django.http import HttpRequest -from django.http.request import QueryDict -from django.http.response import HttpResponse -from django.utils.datastructures import MultiValueDict - -_Stream = Union[BytesIO, str] - -class LimitedStream: - stream: _Stream = ... - remaining: int = ... - buffer: bytes = ... - buf_size: int = ... - def __init__(self, stream: _Stream, limit: int, buf_size: int = ...) -> None: ... - def read(self, size: Optional[int] = ...) -> bytes: ... - def readline(self, size: Optional[int] = ...) -> bytes: ... - -class WSGIRequest(HttpRequest): - content_params: Dict[str, str] - content_type: str - environ: Dict[str, Any] = ... - path_info: str = ... - path: str = ... - user: AbstractUser - session: SessionBase - - META: Dict[str, Any] = ... - method: str = ... - encoding: Any = ... - resolver_match: None = ... - def __init__(self, environ: Dict[str, Any]) -> None: ... - def GET(self) -> QueryDict: ... - def COOKIES(self) -> Dict[str, str]: ... - @property - def FILES(self) -> MultiValueDict: ... - POST: Any = ... - -class WSGIHandler(base.BaseHandler): - request_class: Any = ... - def __init__(self, *args: Any, **kwargs: Any) -> None: ... - def __call__(self, environ: Dict[str, Any], start_response: Callable) -> HttpResponse: ... - -def get_path_info(environ: Dict[str, Any]) -> str: ... -def get_script_name(environ: Dict[str, Any]) -> str: ... -def get_bytes_from_wsgi(environ: Dict[str, Any], key: str, default: str) -> bytes: ... -def get_str_from_wsgi(environ: Dict[str, Any], key: str, default: str) -> str: ... diff --git a/django-stubs-generated/core/mail/__init__.pyi b/django-stubs-generated/core/mail/__init__.pyi deleted file mode 100644 index 42e3589..0000000 --- a/django-stubs-generated/core/mail/__init__.pyi +++ /dev/null @@ -1,48 +0,0 @@ -from typing import Any, List, Optional, Tuple - -from django.core.mail.backends.base import BaseEmailBackend -from django.core.mail.message import DEFAULT_ATTACHMENT_MIME_TYPE as DEFAULT_ATTACHMENT_MIME_TYPE -from django.core.mail.message import BadHeaderError as BadHeaderError -from django.core.mail.message import EmailMessage as EmailMessage -from django.core.mail.message import EmailMultiAlternatives as EmailMultiAlternatives -from django.core.mail.message import SafeMIMEMultipart as SafeMIMEMultipart -from django.core.mail.message import SafeMIMEText as SafeMIMEText -from django.core.mail.message import forbid_multi_line_headers as forbid_multi_line_headers -from django.core.mail.utils import DNS_NAME as DNS_NAME -from django.core.mail.utils import CachedDnsName as CachedDnsName - -def get_connection(backend: Optional[str] = ..., fail_silently: bool = ..., **kwds: Any) -> BaseEmailBackend: ... -def send_mail( - subject: str, - message: str, - from_email: Optional[str], - recipient_list: List[str], - fail_silently: bool = ..., - auth_user: None = ..., - auth_password: None = ..., - connection: Optional[BaseEmailBackend] = ..., - html_message: Optional[str] = ..., -) -> int: ... -def send_mass_mail( - datatuple: List[Tuple[str, str, str, List[str]]], - fail_silently: bool = ..., - auth_user: None = ..., - auth_password: None = ..., - connection: BaseEmailBackend = ..., -) -> int: ... -def mail_admins( - subject: str, - message: str, - fail_silently: bool = ..., - connection: Optional[BaseEmailBackend] = ..., - html_message: Optional[str] = ..., -) -> None: ... -def mail_managers( - subject: str, - message: str, - fail_silently: bool = ..., - connection: Optional[BaseEmailBackend] = ..., - html_message: Optional[str] = ..., -) -> None: ... - -outbox = [EmailMessage()] diff --git a/django-stubs-generated/core/mail/backends/__init__.pyi b/django-stubs-generated/core/mail/backends/__init__.pyi deleted file mode 100644 index e69de29..0000000 diff --git a/django-stubs-generated/core/mail/backends/base.pyi b/django-stubs-generated/core/mail/backends/base.pyi deleted file mode 100644 index 5332e51..0000000 --- a/django-stubs-generated/core/mail/backends/base.pyi +++ /dev/null @@ -1,10 +0,0 @@ -from typing import Any, Optional - -class BaseEmailBackend: - fail_silently: Any = ... - def __init__(self, fail_silently: bool = ..., **kwargs: Any) -> None: ... - def open(self) -> None: ... - def close(self) -> None: ... - def __enter__(self) -> BaseEmailBackend: ... - def __exit__(self, exc_type: None, exc_value: None, traceback: None) -> None: ... - def send_messages(self, email_messages: Any) -> None: ... diff --git a/django-stubs-generated/core/mail/backends/console.pyi b/django-stubs-generated/core/mail/backends/console.pyi deleted file mode 100644 index 0716963..0000000 --- a/django-stubs-generated/core/mail/backends/console.pyi +++ /dev/null @@ -1,11 +0,0 @@ -from typing import Any, Iterator, List, Optional, Union - -from django.core.mail.backends.base import BaseEmailBackend -from django.core.mail.message import EmailMessage - -class EmailBackend(BaseEmailBackend): - fail_silently: bool - stream: _io.StringIO = ... - def __init__(self, *args: Any, **kwargs: Any) -> None: ... - def write_message(self, message: EmailMessage) -> None: ... - def send_messages(self, email_messages: Union[Iterator[Any], List[EmailMessage]]) -> int: ... diff --git a/django-stubs-generated/core/mail/backends/dummy.pyi b/django-stubs-generated/core/mail/backends/dummy.pyi deleted file mode 100644 index f82e85d..0000000 --- a/django-stubs-generated/core/mail/backends/dummy.pyi +++ /dev/null @@ -1,8 +0,0 @@ -from typing import Any, List, Optional - -from django.core.mail.backends.base import BaseEmailBackend -from django.core.mail.message import EmailMessage - -class EmailBackend(BaseEmailBackend): - fail_silently: bool - def send_messages(self, email_messages: List[EmailMessage]) -> int: ... diff --git a/django-stubs-generated/core/mail/backends/filebased.pyi b/django-stubs-generated/core/mail/backends/filebased.pyi deleted file mode 100644 index fe6c7ae..0000000 --- a/django-stubs-generated/core/mail/backends/filebased.pyi +++ /dev/null @@ -1,13 +0,0 @@ -from typing import Any, Optional - -from django.core.mail.backends.console import EmailBackend as ConsoleEmailBackend -from django.core.mail.message import EmailMessage - -class EmailBackend(ConsoleEmailBackend): - fail_silently: bool - file_path: str = ... - def __init__(self, *args: Any, file_path: Optional[Any] = ..., **kwargs: Any) -> None: ... - def write_message(self, message: EmailMessage) -> None: ... - stream: None = ... - def open(self) -> bool: ... - def close(self) -> None: ... diff --git a/django-stubs-generated/core/mail/backends/locmem.pyi b/django-stubs-generated/core/mail/backends/locmem.pyi deleted file mode 100644 index c007c73..0000000 --- a/django-stubs-generated/core/mail/backends/locmem.pyi +++ /dev/null @@ -1,9 +0,0 @@ -from typing import Any, Iterator, List, Optional, Union - -from django.core.mail.backends.base import BaseEmailBackend -from django.core.mail.message import EmailMessage - -class EmailBackend(BaseEmailBackend): - fail_silently: bool - def __init__(self, *args: Any, **kwargs: Any) -> None: ... - def send_messages(self, messages: Union[Iterator[Any], List[EmailMessage]]) -> int: ... diff --git a/django-stubs-generated/core/mail/backends/smtp.pyi b/django-stubs-generated/core/mail/backends/smtp.pyi deleted file mode 100644 index 6e5e8b7..0000000 --- a/django-stubs-generated/core/mail/backends/smtp.pyi +++ /dev/null @@ -1,37 +0,0 @@ -from smtplib import SMTP -from typing import Any, Iterator, List, Optional, Type, Union - -from django.core.mail.backends.base import BaseEmailBackend -from django.core.mail.message import EmailMessage - -class EmailBackend(BaseEmailBackend): - fail_silently: bool - host: Any = ... - port: Any = ... - username: Any = ... - password: Any = ... - use_tls: Any = ... - use_ssl: Any = ... - timeout: Any = ... - ssl_keyfile: Any = ... - ssl_certfile: Any = ... - connection: Any = ... - def __init__( - self, - host: None = ..., - port: None = ..., - username: Optional[str] = ..., - password: Optional[str] = ..., - use_tls: Optional[bool] = ..., - fail_silently: bool = ..., - use_ssl: Optional[bool] = ..., - timeout: None = ..., - ssl_keyfile: Optional[str] = ..., - ssl_certfile: Optional[str] = ..., - **kwargs: Any - ) -> None: ... - @property - def connection_class(self) -> Type[SMTP]: ... - def open(self) -> Optional[bool]: ... - def close(self) -> None: ... - def send_messages(self, email_messages: Union[Iterator[Any], List[EmailMessage]]) -> int: ... diff --git a/django-stubs-generated/core/mail/message.pyi b/django-stubs-generated/core/mail/message.pyi deleted file mode 100644 index b5ddb56..0000000 --- a/django-stubs-generated/core/mail/message.pyi +++ /dev/null @@ -1,119 +0,0 @@ -from email.mime.message import MIMEMessage -from email.mime.multipart import MIMEMultipart -from email.mime.text import MIMEText -from typing import Any, Dict, List, Optional, Tuple, Union - -from django.core.mail.backends.base import BaseEmailBackend - -utf8_charset: Any -utf8_charset_qp: Any -DEFAULT_ATTACHMENT_MIME_TYPE: str -RFC5322_EMAIL_LINE_LENGTH_LIMIT: int - -class BadHeaderError(ValueError): ... - -ADDRESS_HEADERS: Any - -def forbid_multi_line_headers(name: str, val: str, encoding: str) -> Tuple[str, str]: ... -def split_addr(addr: str, encoding: str) -> Tuple[str, str]: ... -def sanitize_address(addr: Union[Tuple[str, str], str], encoding: str) -> str: ... - -class MIMEMixin: - def as_string(self, unixfrom: bool = ..., linesep: str = ...) -> str: ... - def as_bytes(self, unixfrom: bool = ..., linesep: str = ...) -> bytes: ... - -class SafeMIMEMessage(MIMEMixin, MIMEMessage): - defects: List[Any] - epilogue: None - policy: email._policybase.Compat32 - preamble: None - def __setitem__(self, name: str, val: str) -> None: ... - -class SafeMIMEText(MIMEMixin, MIMEText): - defects: List[Any] - epilogue: None - policy: email._policybase.Compat32 - preamble: None - encoding: str = ... - def __init__(self, _text: str, _subtype: str = ..., _charset: str = ...) -> None: ... - def __setitem__(self, name: str, val: str) -> None: ... - def set_payload(self, payload: str, charset: str = ...) -> None: ... - -class SafeMIMEMultipart(MIMEMixin, MIMEMultipart): - defects: List[Any] - epilogue: None - policy: email._policybase.Compat32 - preamble: None - encoding: str = ... - def __init__( - self, _subtype: str = ..., boundary: None = ..., _subparts: None = ..., encoding: str = ..., **_params: Any - ) -> None: ... - def __setitem__(self, name: str, val: str) -> None: ... - -class EmailMessage: - content_subtype: str = ... - mixed_subtype: str = ... - encoding: Any = ... - to: List[str] = ... - cc: List[Any] = ... - bcc: List[Any] = ... - reply_to: List[Any] = ... - from_email: str = ... - subject: str = ... - body: str = ... - attachments: List[Any] = ... - extra_headers: Dict[Any, Any] = ... - connection: None = ... - def __init__( - self, - subject: str = ..., - body: Optional[str] = ..., - from_email: Optional[str] = ..., - to: Optional[Union[List[str], Tuple[str, str], str]] = ..., - bcc: Optional[Union[List[str], Tuple[str], str]] = ..., - connection: Optional[BaseEmailBackend] = ..., - attachments: Optional[Union[List[Tuple[str, str]], List[MIMEText]]] = ..., - headers: Optional[Dict[str, str]] = ..., - cc: Optional[Union[List[str], Tuple[str, str], str]] = ..., - reply_to: Optional[Union[List[Optional[str]], str]] = ..., - ) -> None: ... - def get_connection(self, fail_silently: bool = ...) -> BaseEmailBackend: ... - def message(self) -> MIMEMixin: ... - def recipients(self) -> List[str]: ... - def send(self, fail_silently: bool = ...) -> int: ... - def attach( - self, - filename: Optional[Union[MIMEText, str]] = ..., - content: Optional[Union[bytes, EmailMessage, SafeMIMEText, str]] = ..., - mimetype: Optional[str] = ..., - ) -> None: ... - def attach_file(self, path: str, mimetype: Optional[str] = ...) -> None: ... - -class EmailMultiAlternatives(EmailMessage): - attachments: List[Any] - bcc: List[Any] - body: django.utils.safestring.SafeText - cc: List[Any] - connection: None - extra_headers: Dict[Any, Any] - from_email: str - reply_to: List[Any] - subject: str - to: List[str] - alternative_subtype: str = ... - alternatives: Any = ... - def __init__( - self, - subject: str = ..., - body: str = ..., - from_email: Optional[str] = ..., - to: Optional[List[str]] = ..., - bcc: Optional[List[str]] = ..., - connection: Optional[BaseEmailBackend] = ..., - attachments: None = ..., - headers: Optional[Dict[str, str]] = ..., - alternatives: Optional[List[Tuple[str, str]]] = ..., - cc: None = ..., - reply_to: None = ..., - ) -> None: ... - def attach_alternative(self, content: str, mimetype: str) -> None: ... diff --git a/django-stubs-generated/core/mail/utils.pyi b/django-stubs-generated/core/mail/utils.pyi deleted file mode 100644 index 09c723a..0000000 --- a/django-stubs-generated/core/mail/utils.pyi +++ /dev/null @@ -1,6 +0,0 @@ -from typing import Any, Optional - -class CachedDnsName: - def get_fqdn(self) -> str: ... - -DNS_NAME: Any diff --git a/django-stubs-generated/core/management/__init__.pyi b/django-stubs-generated/core/management/__init__.pyi deleted file mode 100644 index a357e0f..0000000 --- a/django-stubs-generated/core/management/__init__.pyi +++ /dev/null @@ -1,20 +0,0 @@ -from typing import Any, Dict, List, Optional, Tuple, Union - -from django.core.management.base import BaseCommand - -def find_commands(management_dir: str) -> List[str]: ... -def load_command_class(app_name: str, name: str) -> BaseCommand: ... -def get_commands() -> Dict[str, str]: ... -def call_command(command_name: Union[Tuple[str], BaseCommand, str], *args: Any, **options: Any) -> Optional[str]: ... - -class ManagementUtility: - argv: List[str] = ... - prog_name: str = ... - settings_exception: None = ... - def __init__(self, argv: List[str] = ...) -> None: ... - def main_help_text(self, commands_only: bool = ...): ... - def fetch_command(self, subcommand: str) -> BaseCommand: ... - def autocomplete(self) -> None: ... - def execute(self) -> None: ... - -def execute_from_command_line(argv: List[str] = ...) -> None: ... diff --git a/django-stubs-generated/core/management/base.pyi b/django-stubs-generated/core/management/base.pyi deleted file mode 100644 index bce5dcd..0000000 --- a/django-stubs-generated/core/management/base.pyi +++ /dev/null @@ -1,91 +0,0 @@ -from argparse import ArgumentParser, HelpFormatter, Namespace -from io import StringIO, TextIOBase, TextIOWrapper -from typing import Any, Callable, List, Optional, Tuple, Union - -from django.apps.config import AppConfig - -class CommandError(Exception): ... -class SystemCheckError(CommandError): ... - -class CommandParser(ArgumentParser): - add_help: bool - allow_abbrev: bool - argument_default: None - conflict_handler: str - description: str - epilog: None - formatter_class: Type[django.core.management.base.DjangoHelpFormatter] - fromfile_prefix_chars: None - prefix_chars: str - prog: str - usage: None - missing_args_message: None = ... - called_from_command_line: bool = ... - def __init__(self, **kwargs: Any) -> None: ... - def parse_args(self, args: List[str] = ..., namespace: None = ...) -> Namespace: ... - def error(self, message: str) -> Any: ... - -def handle_default_options(options: Namespace) -> None: ... -def no_translations(handle_func: Callable) -> Callable: ... - -class DjangoHelpFormatter(HelpFormatter): - show_last: Any = ... - def add_usage(self, usage: None, actions: List[Any], *args: Any, **kwargs: Any) -> None: ... - def add_arguments(self, actions: List[Any]) -> None: ... - -class OutputWrapper(TextIOBase): - @property - def style_func(self): ... - @style_func.setter - def style_func(self, style_func: Any): ... - style_func: Any = ... - ending: str = ... - def __init__( - self, out: Union[StringIO, TextIOWrapper], style_func: Optional[Callable] = ..., ending: str = ... - ) -> None: ... - def __getattr__(self, name: str) -> Callable: ... - def isatty(self) -> bool: ... - def write(self, msg: str, style_func: Optional[Callable] = ..., ending: Optional[str] = ...) -> None: ... - -class BaseCommand: - help: str = ... - output_transaction: bool = ... - requires_migrations_checks: bool = ... - requires_system_checks: bool = ... - base_stealth_options: Any = ... - stealth_options: Any = ... - stdout: django.core.management.base.OutputWrapper = ... - stderr: django.core.management.base.OutputWrapper = ... - style: django.core.management.color.Style = ... - def __init__( - self, stdout: Optional[StringIO] = ..., stderr: Optional[StringIO] = ..., no_color: bool = ... - ) -> None: ... - def get_version(self) -> str: ... - def create_parser(self, prog_name: str, subcommand: str) -> CommandParser: ... - def add_arguments(self, parser: CommandParser) -> None: ... - def print_help(self, prog_name: str, subcommand: str) -> None: ... - def run_from_argv(self, argv: List[str]) -> None: ... - def execute(self, *args: Any, **options: Any) -> Optional[Union[Tuple, str]]: ... - def check( - self, - app_configs: Optional[List[AppConfig]] = ..., - tags: Optional[List[str]] = ..., - display_num_errors: bool = ..., - include_deployment_checks: bool = ..., - fail_level: int = ..., - ) -> None: ... - def check_migrations(self) -> None: ... - def handle(self, *args: Any, **options: Any) -> None: ... - -class AppCommand(BaseCommand): - missing_args_message: str = ... - def add_arguments(self, parser: Any) -> None: ... - def handle(self, *app_labels: Any, **options: Any): ... - def handle_app_config(self, app_config: Any, **options: Any) -> None: ... - -class LabelCommand(BaseCommand): - label: str = ... - missing_args_message: Any = ... - def add_arguments(self, parser: CommandParser) -> None: ... - def handle(self, *labels: Any, **options: Any) -> str: ... - def handle_label(self, label: Any, **options: Any) -> None: ... diff --git a/django-stubs-generated/core/management/color.pyi b/django-stubs-generated/core/management/color.pyi deleted file mode 100644 index 167e150..0000000 --- a/django-stubs-generated/core/management/color.pyi +++ /dev/null @@ -1,9 +0,0 @@ -from typing import Optional - -def supports_color() -> bool: ... - -class Style: ... - -def make_style(config_string: str = ...) -> Style: ... -def no_style(): ... -def color_style() -> Style: ... diff --git a/django-stubs-generated/core/management/commands/__init__.pyi b/django-stubs-generated/core/management/commands/__init__.pyi deleted file mode 100644 index e69de29..0000000 diff --git a/django-stubs-generated/core/management/commands/check.pyi b/django-stubs-generated/core/management/commands/check.pyi deleted file mode 100644 index 29e805e..0000000 --- a/django-stubs-generated/core/management/commands/check.pyi +++ /dev/null @@ -1,12 +0,0 @@ -from typing import Any, Optional - -from django.core.management.base import BaseCommand, CommandParser - -class Command(BaseCommand): - stderr: django.core.management.base.OutputWrapper - stdout: django.core.management.base.OutputWrapper - style: django.core.management.color.Style - help: str = ... - requires_system_checks: bool = ... - def add_arguments(self, parser: CommandParser) -> None: ... - def handle(self, *app_labels: Any, **options: Any) -> None: ... diff --git a/django-stubs-generated/core/management/commands/compilemessages.pyi b/django-stubs-generated/core/management/commands/compilemessages.pyi deleted file mode 100644 index 7b74590..0000000 --- a/django-stubs-generated/core/management/commands/compilemessages.pyi +++ /dev/null @@ -1,19 +0,0 @@ -from typing import Any, List, Optional, Tuple - -from django.core.management.base import BaseCommand, CommandParser - -def has_bom(fn: str) -> bool: ... -def is_writable(path: str) -> bool: ... - -class Command(BaseCommand): - stderr: django.core.management.base.OutputWrapper - stdout: django.core.management.base.OutputWrapper - style: django.core.management.color.Style - help: str = ... - requires_system_checks: bool = ... - program: str = ... - program_options: Any = ... - def add_arguments(self, parser: CommandParser) -> None: ... - verbosity: Any = ... - def handle(self, **options: Any) -> None: ... - def compile_messages(self, locations: List[Tuple[str, str]]) -> None: ... diff --git a/django-stubs-generated/core/management/commands/createcachetable.pyi b/django-stubs-generated/core/management/commands/createcachetable.pyi deleted file mode 100644 index 5dfa2c9..0000000 --- a/django-stubs-generated/core/management/commands/createcachetable.pyi +++ /dev/null @@ -1,14 +0,0 @@ -from typing import Any, Optional - -from django.core.management.base import BaseCommand, CommandParser - -class Command(BaseCommand): - stderr: django.core.management.base.OutputWrapper - stdout: django.core.management.base.OutputWrapper - style: django.core.management.color.Style - help: str = ... - requires_system_checks: bool = ... - def add_arguments(self, parser: CommandParser) -> None: ... - verbosity: Any = ... - def handle(self, *tablenames: Any, **options: Any) -> None: ... - def create_table(self, database: str, tablename: str, dry_run: bool) -> None: ... diff --git a/django-stubs-generated/core/management/commands/dumpdata.pyi b/django-stubs-generated/core/management/commands/dumpdata.pyi deleted file mode 100644 index b7fc0c8..0000000 --- a/django-stubs-generated/core/management/commands/dumpdata.pyi +++ /dev/null @@ -1,13 +0,0 @@ -from typing import Any, Optional - -from django.core.management.base import BaseCommand, CommandParser - -class ProxyModelWarning(Warning): ... - -class Command(BaseCommand): - 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 handle(self, *app_labels: Any, **options: Any) -> None: ... diff --git a/django-stubs-generated/core/management/commands/flush.pyi b/django-stubs-generated/core/management/commands/flush.pyi deleted file mode 100644 index f97cbcf..0000000 --- a/django-stubs-generated/core/management/commands/flush.pyi +++ /dev/null @@ -1,12 +0,0 @@ -from typing import Any, Optional - -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 = ... - stealth_options: Any = ... - def add_arguments(self, parser: CommandParser) -> None: ... - style: django.core.management.color.Style = ... - def handle(self, **options: Any) -> None: ... diff --git a/django-stubs-generated/core/management/commands/inspectdb.pyi b/django-stubs-generated/core/management/commands/inspectdb.pyi deleted file mode 100644 index b68c428..0000000 --- a/django-stubs-generated/core/management/commands/inspectdb.pyi +++ /dev/null @@ -1,31 +0,0 @@ -from collections import OrderedDict -from typing import Any, Dict, Iterator, List, Optional, Tuple, Union - -from django.core.management.base import BaseCommand, CommandParser -from django.db.backends.base.introspection import FieldInfo -from django.db.backends.sqlite3.base import DatabaseWrapper - -class Command(BaseCommand): - stderr: django.core.management.base.OutputWrapper - stdout: django.core.management.base.OutputWrapper - style: django.core.management.color.Style - help: str = ... - requires_system_checks: bool = ... - stealth_options: Any = ... - db_module: str = ... - def add_arguments(self, parser: CommandParser) -> None: ... - def handle(self, **options: Any) -> None: ... - def handle_inspection(self, options: Dict[str, Any]) -> Iterator[str]: ... - def normalize_col_name( - self, col_name: str, used_column_names: List[str], is_relation: bool - ) -> Tuple[str, Dict[str, str], List[str]]: ... - def get_field_type( - self, connection: DatabaseWrapper, table_name: str, row: FieldInfo - ) -> Tuple[str, OrderedDict, List[str]]: ... - def get_meta( - self, - table_name: str, - constraints: Dict[str, Dict[str, Union[List[str], bool]]], - column_to_field_name: Dict[str, str], - is_view: bool, - ) -> List[str]: ... diff --git a/django-stubs-generated/core/management/commands/loaddata.pyi b/django-stubs-generated/core/management/commands/loaddata.pyi deleted file mode 100644 index 80c0e68..0000000 --- a/django-stubs-generated/core/management/commands/loaddata.pyi +++ /dev/null @@ -1,47 +0,0 @@ -import zipfile -from typing import Any, List, Optional, Tuple - -from django.core.management.base import BaseCommand, CommandParser - -has_bz2: bool -READ_STDIN: str - -class Command(BaseCommand): - stderr: django.core.management.base.OutputWrapper - stdout: django.core.management.base.OutputWrapper - style: django.core.management.color.Style - help: str = ... - missing_args_message: str = ... - def add_arguments(self, parser: CommandParser) -> None: ... - ignore: Any = ... - using: Any = ... - app_label: Any = ... - verbosity: Any = ... - format: Any = ... - def handle(self, *fixture_labels: Any, **options: Any) -> None: ... - fixture_count: int = ... - loaded_object_count: int = ... - fixture_object_count: int = ... - models: Any = ... - serialization_formats: Any = ... - compression_formats: Any = ... - def loaddata(self, fixture_labels: Tuple[str]) -> None: ... - def load_label(self, fixture_label: str) -> None: ... - def find_fixtures(self, fixture_label: str) -> List[Tuple[str, Optional[str], str]]: ... - def fixture_dirs(self) -> List[str]: ... - def parse_name(self, fixture_name: str) -> Tuple[str, Optional[str], Optional[str]]: ... - -class SingleZipReader(zipfile.ZipFile): - NameToInfo: Dict[str, zipfile.ZipInfo] - compression: int - debug: int - filelist: List[zipfile.ZipInfo] - filename: str - fp: _io.BufferedReader - mode: str - pwd: None - start_dir: int - def __init__(self, *args: Any, **kwargs: Any) -> None: ... - def read(self) -> bytes: ... - -def humanize(dirname: str) -> str: ... diff --git a/django-stubs-generated/core/management/commands/makemessages.pyi b/django-stubs-generated/core/management/commands/makemessages.pyi deleted file mode 100644 index f72f045..0000000 --- a/django-stubs-generated/core/management/commands/makemessages.pyi +++ /dev/null @@ -1,68 +0,0 @@ -from typing import Any, List, Optional, Tuple - -from django.core.management.base import BaseCommand, CommandParser - -plural_forms_re: Any -STATUS_OK: int -NO_LOCALE_DIR: Any - -def check_programs(*programs: Any) -> None: ... - -class TranslatableFile: - file: str = ... - dirpath: str = ... - locale_dir: str = ... - def __init__(self, dirpath: str, file_name: str, locale_dir: Any) -> None: ... - def __eq__(self, other: TranslatableFile) -> bool: ... - def __lt__(self, other: TranslatableFile) -> bool: ... - @property - def path(self) -> str: ... - -class BuildFile: - command: django.core.management.commands.makemessages.Command = ... - domain: str = ... - translatable: django.core.management.commands.makemessages.TranslatableFile = ... - def __init__(self, command: Command, domain: str, translatable: TranslatableFile) -> None: ... - def is_templatized(self) -> bool: ... - def path(self) -> str: ... - def work_path(self) -> str: ... - def preprocess(self) -> None: ... - def postprocess_messages(self, msgs: str) -> str: ... - def cleanup(self) -> None: ... - -def normalize_eols(raw_contents: str) -> str: ... -def write_pot_file(potfile: str, msgs: str) -> None: ... - -class Command(BaseCommand): - stderr: django.core.management.base.OutputWrapper - stdout: django.core.management.base.OutputWrapper - style: django.core.management.color.Style - help: str = ... - translatable_file_class: Any = ... - build_file_class: Any = ... - requires_system_checks: bool = ... - msgmerge_options: Any = ... - msguniq_options: Any = ... - msgattrib_options: Any = ... - xgettext_options: Any = ... - def add_arguments(self, parser: CommandParser) -> None: ... - domain: Any = ... - verbosity: Any = ... - symlinks: Any = ... - ignore_patterns: Any = ... - no_obsolete: Any = ... - keep_pot: Any = ... - extensions: Any = ... - invoked_for_django: bool = ... - locale_paths: Any = ... - default_locale_path: Any = ... - def handle(self, *args: Any, **options: Any) -> None: ... - def gettext_version(self) -> Tuple[int, int]: ... - def settings_available(self) -> bool: ... - def build_potfiles(self) -> List[str]: ... - def remove_potfiles(self) -> None: ... - def find_files(self, root: str) -> List[TranslatableFile]: ... - def process_files(self, file_list: List[TranslatableFile]) -> None: ... - def process_locale_dir(self, locale_dir: Any, files: List[TranslatableFile]) -> None: ... - def write_po_file(self, potfile: str, locale: str) -> None: ... - def copy_plural_forms(self, msgs: str, locale: str) -> str: ... diff --git a/django-stubs-generated/core/management/commands/makemigrations.pyi b/django-stubs-generated/core/management/commands/makemigrations.pyi deleted file mode 100644 index fbdfdca..0000000 --- a/django-stubs-generated/core/management/commands/makemigrations.pyi +++ /dev/null @@ -1,21 +0,0 @@ -from typing import Any, Dict, List, Optional, Set - -from django.core.management.base import BaseCommand, CommandParser -from django.db.migrations.loader import MigrationLoader -from django.db.migrations.migration import Migration - -class Command(BaseCommand): - 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: ... - verbosity: int = ... - interactive: bool = ... - dry_run: bool = ... - merge: bool = ... - empty: bool = ... - migration_name: None = ... - def handle(self, *app_labels: Any, **options: Any): ... - def write_migration_files(self, changes: Dict[str, List[Migration]]) -> None: ... - def handle_merge(self, loader: MigrationLoader, conflicts: Dict[str, Set[str]]) -> None: ... diff --git a/django-stubs-generated/core/management/commands/migrate.pyi b/django-stubs-generated/core/management/commands/migrate.pyi deleted file mode 100644 index b1e647a..0000000 --- a/django-stubs-generated/core/management/commands/migrate.pyi +++ /dev/null @@ -1,20 +0,0 @@ -from typing import Any, Optional, Set - -from django.core.management.base import BaseCommand, CommandParser -from django.db.backends.sqlite3.base import DatabaseWrapper -from django.db.migrations.migration import Migration - -class Command(BaseCommand): - 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: ... - verbosity: Any = ... - interactive: Any = ... - def handle(self, *args: Any, **options: Any) -> None: ... - start: Any = ... - def migration_progress_callback( - self, action: str, migration: Optional[Migration] = ..., fake: bool = ... - ) -> None: ... - def sync_apps(self, connection: DatabaseWrapper, app_labels: Set[str]) -> None: ... diff --git a/django-stubs-generated/core/management/commands/runserver.pyi b/django-stubs-generated/core/management/commands/runserver.pyi deleted file mode 100644 index 87864d7..0000000 --- a/django-stubs-generated/core/management/commands/runserver.pyi +++ /dev/null @@ -1,30 +0,0 @@ -from typing import Any, Optional - -from django.core.handlers.wsgi import WSGIHandler -from django.core.management.base import BaseCommand, CommandParser - -naiveip_re: Any - -class Command(BaseCommand): - stderr: django.core.management.base.OutputWrapper - stdout: django.core.management.base.OutputWrapper - style: django.core.management.color.Style - help: str = ... - requires_system_checks: bool = ... - stealth_options: Any = ... - default_addr: str = ... - default_addr_ipv6: str = ... - default_port: str = ... - protocol: str = ... - server_cls: Any = ... - def add_arguments(self, parser: CommandParser) -> None: ... - def execute(self, *args: Any, **options: Any) -> None: ... - def get_handler(self, *args: Any, **options: Any) -> WSGIHandler: ... - use_ipv6: Any = ... - addr: str = ... - port: Any = ... - def handle(self, *args: Any, **options: Any) -> None: ... - def run(self, **options: Any) -> None: ... - def inner_run(self, *args: Any, **options: Any) -> None: ... - -BaseRunserverCommand = Command diff --git a/django-stubs-generated/core/management/commands/sendtestemail.pyi b/django-stubs-generated/core/management/commands/sendtestemail.pyi deleted file mode 100644 index 4e95de0..0000000 --- a/django-stubs-generated/core/management/commands/sendtestemail.pyi +++ /dev/null @@ -1,12 +0,0 @@ -from typing import Any, Optional - -from django.core.management.base import BaseCommand, CommandParser - -class Command(BaseCommand): - stderr: django.core.management.base.OutputWrapper - stdout: django.core.management.base.OutputWrapper - style: django.core.management.color.Style - help: str = ... - missing_args_message: str = ... - def add_arguments(self, parser: CommandParser) -> None: ... - def handle(self, *args: Any, **kwargs: Any) -> None: ... diff --git a/django-stubs-generated/core/management/commands/shell.pyi b/django-stubs-generated/core/management/commands/shell.pyi deleted file mode 100644 index 3348568..0000000 --- a/django-stubs-generated/core/management/commands/shell.pyi +++ /dev/null @@ -1,17 +0,0 @@ -from typing import Any, Dict, Optional, Union - -from django.core.management import BaseCommand -from django.core.management.base import CommandParser - -class Command(BaseCommand): - stderr: django.core.management.base.OutputWrapper - stdout: django.core.management.base.OutputWrapper - style: django.core.management.color.Style - help: str = ... - requires_system_checks: bool = ... - shells: Any = ... - def add_arguments(self, parser: CommandParser) -> None: ... - def ipython(self, options: Dict[str, Optional[Union[int, str]]]) -> Any: ... - def bpython(self, options: Dict[str, Optional[Union[int, str]]]) -> Any: ... - def python(self, options: Any) -> None: ... - def handle(self, **options: Any) -> None: ... diff --git a/django-stubs-generated/core/management/commands/showmigrations.pyi b/django-stubs-generated/core/management/commands/showmigrations.pyi deleted file mode 100644 index b6dec44..0000000 --- a/django-stubs-generated/core/management/commands/showmigrations.pyi +++ /dev/null @@ -1,15 +0,0 @@ -from typing import Any, List, Optional - -from django.core.management.base import BaseCommand, CommandParser -from django.db.backends.sqlite3.base import DatabaseWrapper - -class Command(BaseCommand): - 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: ... - verbosity: Any = ... - def handle(self, *args: Any, **options: Any) -> None: ... - def show_list(self, connection: DatabaseWrapper, app_names: List[str] = ...) -> None: ... - def show_plan(self, connection: DatabaseWrapper, app_names: List[str] = ...) -> None: ... diff --git a/django-stubs-generated/core/management/commands/sqlmigrate.pyi b/django-stubs-generated/core/management/commands/sqlmigrate.pyi deleted file mode 100644 index 6cef157..0000000 --- a/django-stubs-generated/core/management/commands/sqlmigrate.pyi +++ /dev/null @@ -1,13 +0,0 @@ -from typing import Any, Optional - -from django.core.management.base import BaseCommand, CommandParser - -class Command(BaseCommand): - stderr: django.core.management.base.OutputWrapper - stdout: django.core.management.base.OutputWrapper - style: django.core.management.color.Style - help: str = ... - output_transaction: bool = ... - def add_arguments(self, parser: CommandParser) -> None: ... - def execute(self, *args: Any, **options: Any) -> str: ... - def handle(self, *args: Any, **options: Any) -> str: ... diff --git a/django-stubs-generated/core/management/commands/squashmigrations.pyi b/django-stubs-generated/core/management/commands/squashmigrations.pyi deleted file mode 100644 index 94ddfe9..0000000 --- a/django-stubs-generated/core/management/commands/squashmigrations.pyi +++ /dev/null @@ -1,14 +0,0 @@ -from typing import Any, Optional - -from django.core.management.base import BaseCommand, CommandParser - -class Command(BaseCommand): - 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: ... - verbosity: Any = ... - interactive: Any = ... - def handle(self, **options: Any) -> None: ... - def find_migration(self, loader: Any, app_label: Any, name: Any): ... diff --git a/django-stubs-generated/core/management/commands/test.pyi b/django-stubs-generated/core/management/commands/test.pyi deleted file mode 100644 index 3051b44..0000000 --- a/django-stubs-generated/core/management/commands/test.pyi +++ /dev/null @@ -1,2 +0,0 @@ -class Command: - def handle(self, *test_labels, **options): ... diff --git a/django-stubs-generated/core/management/commands/testserver.pyi b/django-stubs-generated/core/management/commands/testserver.pyi deleted file mode 100644 index 97f9fa9..0000000 --- a/django-stubs-generated/core/management/commands/testserver.pyi +++ /dev/null @@ -1,12 +0,0 @@ -from typing import Any, Optional - -from django.core.management.base import BaseCommand, CommandParser - -class Command(BaseCommand): - stderr: django.core.management.base.OutputWrapper - stdout: django.core.management.base.OutputWrapper - style: django.core.management.color.Style - help: str = ... - requires_system_checks: bool = ... - def add_arguments(self, parser: CommandParser) -> None: ... - def handle(self, *fixture_labels: Any, **options: Any) -> None: ... diff --git a/django-stubs-generated/core/management/sql.pyi b/django-stubs-generated/core/management/sql.pyi deleted file mode 100644 index 74d5cbe..0000000 --- a/django-stubs-generated/core/management/sql.pyi +++ /dev/null @@ -1,14 +0,0 @@ -from typing import Any, List, Optional - -from django.core.management.color import Style -from django.db.backends.sqlite3.base import DatabaseWrapper - -def sql_flush( - style: Style, - connection: DatabaseWrapper, - only_django: bool = ..., - reset_sequences: bool = ..., - allow_cascade: bool = ..., -) -> List[str]: ... -def emit_pre_migrate_signal(verbosity: int, interactive: bool, db: str, **kwargs: Any) -> None: ... -def emit_post_migrate_signal(verbosity: int, interactive: bool, db: str, **kwargs: Any) -> None: ... diff --git a/django-stubs-generated/core/management/templates.pyi b/django-stubs-generated/core/management/templates.pyi deleted file mode 100644 index 8147cae..0000000 --- a/django-stubs-generated/core/management/templates.pyi +++ /dev/null @@ -1,20 +0,0 @@ -from typing import Any, Optional - -from django.core.management.base import BaseCommand, CommandParser - -class TemplateCommand(BaseCommand): - requires_system_checks: bool = ... - url_schemes: Any = ... - rewrite_template_suffixes: Any = ... - def add_arguments(self, parser: CommandParser) -> None: ... - app_or_project: Any = ... - paths_to_remove: Any = ... - verbosity: Any = ... - def handle(self, app_or_project: Any, name: Any, target: Optional[Any] = ..., **options: Any): ... - def handle_template(self, template: Any, subdir: Any): ... - def validate_name(self, name: Any, app_or_project: Any) -> None: ... - def download(self, url: Any): ... - def splitext(self, the_path: Any): ... - def extract(self, filename: Any): ... - def is_url(self, template: Any): ... - def make_writeable(self, filename: Any) -> None: ... diff --git a/django-stubs-generated/core/management/utils.pyi b/django-stubs-generated/core/management/utils.pyi deleted file mode 100644 index 0f9e96b..0000000 --- a/django-stubs-generated/core/management/utils.pyi +++ /dev/null @@ -1,12 +0,0 @@ -from typing import Any, List, Optional, Set, Tuple, Type - -from django.apps.config import AppConfig -from django.db.models.base import Model - -from .base import CommandError - -def popen_wrapper(args: List[str], stdout_encoding: str = ...) -> Tuple[str, str, int]: ... -def handle_extensions(extensions: List[str]) -> Set[str]: ... -def find_command(cmd: str, path: None = ..., pathext: None = ...) -> Optional[str]: ... -def get_random_secret_key(): ... -def parse_apps_and_model_labels(labels: List[str]) -> Tuple[Set[Type[Model]], Set[AppConfig]]: ... diff --git a/django-stubs-generated/core/paginator.pyi b/django-stubs-generated/core/paginator.pyi deleted file mode 100644 index 29843ef..0000000 --- a/django-stubs-generated/core/paginator.pyi +++ /dev/null @@ -1,52 +0,0 @@ -import collections.abc -from typing import Any, Dict, List, Optional, Union - -from django.db.models.base import Model -from django.db.models.query import QuerySet - -class UnorderedObjectListWarning(RuntimeWarning): ... -class InvalidPage(Exception): ... -class PageNotAnInteger(InvalidPage): ... -class EmptyPage(InvalidPage): ... - -class Paginator: - object_list: django.db.models.query.QuerySet = ... - per_page: int = ... - orphans: int = ... - allow_empty_first_page: bool = ... - def __init__( - self, - object_list: Union[List[Dict[str, str]], List[Model], List[int], QuerySet, str], - per_page: Union[int, str], - orphans: int = ..., - allow_empty_first_page: bool = ..., - ) -> None: ... - def validate_number(self, number: Optional[Union[float, str]]) -> int: ... - def get_page(self, number: Optional[int]) -> Page: ... - def page(self, number: Union[int, str]) -> Page: ... - def count(self) -> int: ... - def num_pages(self) -> int: ... - @property - def page_range(self) -> range: ... - -QuerySetPaginator = Paginator - -class Page(collections.abc.Sequence): - object_list: django.db.models.query.QuerySet = ... - number: int = ... - paginator: django.core.paginator.Paginator = ... - def __init__( - self, - object_list: Union[List[Dict[str, str]], List[Model], List[int], QuerySet, str], - number: int, - paginator: Paginator, - ) -> None: ... - def __len__(self) -> int: ... - def __getitem__(self, index: Union[int, str]) -> Union[Model, str]: ... - def has_next(self) -> bool: ... - def has_previous(self) -> bool: ... - def has_other_pages(self) -> bool: ... - def next_page_number(self) -> int: ... - def previous_page_number(self) -> int: ... - def start_index(self) -> int: ... - def end_index(self) -> int: ... diff --git a/django-stubs-generated/core/serializers/__init__.pyi b/django-stubs-generated/core/serializers/__init__.pyi deleted file mode 100644 index 57c4a57..0000000 --- a/django-stubs-generated/core/serializers/__init__.pyi +++ /dev/null @@ -1,30 +0,0 @@ -from collections import OrderedDict -from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Type, Union - -from django.apps.config import AppConfig -from django.core.serializers.base import Serializer -from django.core.serializers.xml_serializer import Deserializer -from django.db.models.base import Model -from django.db.models.query import QuerySet - -BUILTIN_SERIALIZERS: Any - -class BadSerializer: - internal_use_only: bool = ... - exception: ModuleNotFoundError = ... - def __init__(self, exception: ImportError) -> None: ... - def __call__(self, *args: Any, **kwargs: Any) -> Any: ... - -def register_serializer(format: str, serializer_module: str, serializers: Optional[Dict[str, Any]] = ...) -> None: ... -def unregister_serializer(format: str) -> None: ... -def get_serializer(format: str) -> Union[Type[Serializer], BadSerializer]: ... -def get_serializer_formats() -> List[str]: ... -def get_public_serializer_formats() -> List[str]: ... -def get_deserializer(format: str) -> Union[Callable, Type[Deserializer]]: ... -def serialize( - format: str, queryset: Union[Iterator[Any], List[Model], QuerySet], **options: Any -) -> Optional[Union[List[OrderedDict], bytes, str]]: ... -def deserialize(format: str, stream_or_string: Any, **options: Any) -> Union[Iterator[Any], Deserializer]: ... -def sort_dependencies( - app_list: Union[List[Tuple[AppConfig, None]], List[Tuple[str, List[Type[Model]]]]] -) -> List[Type[Model]]: ... diff --git a/django-stubs-generated/core/serializers/base.pyi b/django-stubs-generated/core/serializers/base.pyi deleted file mode 100644 index a3d044e..0000000 --- a/django-stubs-generated/core/serializers/base.pyi +++ /dev/null @@ -1,85 +0,0 @@ -from collections import OrderedDict -from datetime import date -from io import BufferedReader, StringIO, TextIOWrapper -from typing import Any, Dict, Iterator, List, Optional, Tuple, Type, Union -from uuid import UUID - -from django.core.management.base import OutputWrapper -from django.core.serializers.xml_serializer import Deserializer -from django.db.models.base import Model -from django.db.models.fields.related import ForeignKey, ManyToManyField -from django.db.models.query import QuerySet - -class SerializerDoesNotExist(KeyError): ... -class SerializationError(Exception): ... - -class DeserializationError(Exception): - @classmethod - def WithData( - cls, original_exc: Exception, model: str, fk: Union[int, str], field_value: Optional[Union[List[str], str]] - ) -> DeserializationError: ... - -class M2MDeserializationError(Exception): - original_exc: django.core.exceptions.ObjectDoesNotExist = ... - pk: List[str] = ... - def __init__(self, original_exc: Exception, pk: Union[List[str], str]) -> None: ... - -class ProgressBar: - progress_width: int = ... - output: None = ... - total_count: int = ... - prev_done: int = ... - def __init__(self, output: Optional[Union[StringIO, OutputWrapper]], total_count: int) -> None: ... - def update(self, count: int) -> None: ... - -class Serializer: - internal_use_only: bool = ... - progress_class: Any = ... - stream_class: Any = ... - options: Any = ... - stream: Any = ... - selected_fields: Any = ... - use_natural_foreign_keys: Any = ... - use_natural_primary_keys: Any = ... - first: bool = ... - def serialize( - self, - queryset: Union[Iterator[Any], List[Model], QuerySet], - *, - stream: Optional[Any] = ..., - fields: Optional[Any] = ..., - use_natural_foreign_keys: bool = ..., - use_natural_primary_keys: bool = ..., - progress_output: Optional[Any] = ..., - object_count: int = ..., - **options: Any - ) -> Optional[Union[List[OrderedDict], bytes, str]]: ... - def start_serialization(self) -> None: ... - def end_serialization(self) -> None: ... - def start_object(self, obj: Any) -> None: ... - def end_object(self, obj: Any) -> None: ... - def handle_field(self, obj: Any, field: Any) -> None: ... - def handle_fk_field(self, obj: Any, field: Any) -> None: ... - def handle_m2m_field(self, obj: Any, field: Any) -> None: ... - def getvalue(self) -> Optional[Union[bytes, str]]: ... - -class Deserializer: - options: Any = ... - stream: Any = ... - def __init__(self, stream_or_string: Union[BufferedReader, TextIOWrapper, str], **options: Any) -> None: ... - def __iter__(self) -> Deserializer: ... - def __next__(self) -> None: ... - -class DeserializedObject: - object: django.db.models.base.Model = ... - m2m_data: Dict[Any, Any] = ... - def __init__(self, obj: Model, m2m_data: Optional[Dict[str, List[int]]] = ...) -> None: ... - def save(self, save_m2m: bool = ..., using: Optional[str] = ..., **kwargs: Any) -> None: ... - -def build_instance(Model: Type[Model], data: Dict[str, Optional[Union[date, int, str, UUID]]], db: str) -> Model: ... -def deserialize_m2m_values( - field: ManyToManyField, field_value: Union[List[List[str]], List[int]], using: str -) -> List[int]: ... -def deserialize_fk_value( - field: ForeignKey, field_value: Optional[Union[List[str], Tuple[str], int, str]], using: str -) -> Optional[Union[int, str, UUID]]: ... diff --git a/django-stubs-generated/core/serializers/json.pyi b/django-stubs-generated/core/serializers/json.pyi deleted file mode 100644 index 20fe922..0000000 --- a/django-stubs-generated/core/serializers/json.pyi +++ /dev/null @@ -1,32 +0,0 @@ -import json -from datetime import datetime -from decimal import Decimal -from typing import Any, Optional, Union -from uuid import UUID - -from django.core.serializers.python import Serializer as PythonSerializer -from django.db.models.base import Model - -class Serializer(PythonSerializer): - json_kwargs: Dict[str, Optional[Type[django.core.serializers.json.DjangoJSONEncoder]]] - options: Dict[str, None] - selected_fields: None - stream: _io.StringIO - use_natural_foreign_keys: bool - use_natural_primary_keys: bool - internal_use_only: bool = ... - def start_serialization(self) -> None: ... - def end_serialization(self) -> None: ... - def end_object(self, obj: Model) -> None: ... - def getvalue(self) -> Optional[Union[bytes, str]]: ... - -def Deserializer(stream_or_string: Any, **options: Any) -> None: ... - -class DjangoJSONEncoder(json.JSONEncoder): - allow_nan: bool - check_circular: bool - ensure_ascii: bool - indent: None - skipkeys: bool - sort_keys: bool - def default(self, o: Union[datetime, Decimal, UUID]) -> str: ... diff --git a/django-stubs-generated/core/serializers/python.pyi b/django-stubs-generated/core/serializers/python.pyi deleted file mode 100644 index 36976ca..0000000 --- a/django-stubs-generated/core/serializers/python.pyi +++ /dev/null @@ -1,38 +0,0 @@ -from collections import OrderedDict -from typing import Any, Dict, Iterator, List, Optional, Union - -from django.core.serializers import base -from django.core.serializers.base import DeserializedObject -from django.db.models.base import Model -from django.db.models.fields import Field -from django.db.models.fields.related import ForeignKey, ManyToManyField - -class Serializer(base.Serializer): - options: Dict[Any, Any] - selected_fields: None - stream: _io.StringIO - use_natural_foreign_keys: bool - use_natural_primary_keys: bool - internal_use_only: bool = ... - objects: List[Any] = ... - def start_serialization(self) -> None: ... - def end_serialization(self) -> None: ... - def start_object(self, obj: Model) -> None: ... - def end_object(self, obj: Model) -> None: ... - def get_dump_object(self, obj: Model) -> OrderedDict: ... - def handle_field(self, obj: Model, field: Field) -> None: ... - def handle_fk_field(self, obj: Model, field: ForeignKey) -> None: ... - def handle_m2m_field(self, obj: Model, field: ManyToManyField) -> None: ... - def getvalue(self) -> List[OrderedDict]: ... - -def Deserializer( - object_list: Union[ - List[Dict[str, Optional[Union[Dict[str, Optional[str]], str]]]], - List[Dict[str, Union[Dict[str, Union[List[int], int, str]], int, str]]], - List[OrderedDict], - ], - *, - using: Any = ..., - ignorenonexistent: bool = ..., - **options: Any -) -> Iterator[DeserializedObject]: ... diff --git a/django-stubs-generated/core/serializers/pyyaml.pyi b/django-stubs-generated/core/serializers/pyyaml.pyi deleted file mode 100644 index 813bf78..0000000 --- a/django-stubs-generated/core/serializers/pyyaml.pyi +++ /dev/null @@ -1,72 +0,0 @@ -from collections import OrderedDict -from decimal import Decimal -from typing import Any, Optional, Union - -from yaml import CSafeDumper as SafeDumper -from yaml.nodes import MappingNode, ScalarNode - -from django.core.serializers.python import Serializer as PythonSerializer -from django.db.models.base import Model -from django.db.models.fields import Field - -class DjangoSafeDumper(SafeDumper): - alias_key: int - allow_unicode: None - analysis: None - anchors: Dict[Any, Any] - best_indent: int - best_line_break: str - best_width: int - canonical: None - closed: bool - column: int - default_flow_style: None - default_style: None - encoding: None - event: None - events: List[Any] - flow_level: int - indent: None - indention: bool - indents: List[Any] - last_anchor_id: int - line: int - mapping_context: bool - object_keeper: List[Union[List[collections.OrderedDict], collections.OrderedDict, datetime.datetime]] - open_ended: bool - prepared_anchor: None - prepared_tag: None - represented_objects: Dict[int, Union[yaml.nodes.MappingNode, yaml.nodes.ScalarNode, yaml.nodes.SequenceNode]] - resolver_exact_paths: List[Any] - resolver_prefix_paths: List[Any] - root_context: bool - sequence_context: bool - serialized_nodes: Dict[Any, Any] - simple_key_context: bool - state: Callable - states: List[Any] - stream: _io.StringIO - style: None - tag_prefixes: None - use_encoding: None - use_explicit_end: None - use_explicit_start: None - use_tags: None - use_version: None - whitespace: bool - def represent_decimal(self, data: Decimal) -> ScalarNode: ... - def represent_ordered_dict(self, data: OrderedDict) -> MappingNode: ... - -class Serializer(PythonSerializer): - objects: List[Any] - options: Dict[Any, Any] - selected_fields: None - stream: _io.StringIO - use_natural_foreign_keys: bool - use_natural_primary_keys: bool - internal_use_only: bool = ... - def handle_field(self, obj: Model, field: Field) -> None: ... - def end_serialization(self) -> None: ... - def getvalue(self) -> Union[bytes, str]: ... - -def Deserializer(stream_or_string: str, **options: Any) -> None: ... diff --git a/django-stubs-generated/core/serializers/xml_serializer.pyi b/django-stubs-generated/core/serializers/xml_serializer.pyi deleted file mode 100644 index 27d64e4..0000000 --- a/django-stubs-generated/core/serializers/xml_serializer.pyi +++ /dev/null @@ -1,78 +0,0 @@ -from io import BufferedReader, TextIOWrapper -from typing import Any, Optional, Union -from xml.dom.minidom import Element -from xml.sax.expatreader import ExpatParser as _ExpatParser - -from django.core.serializers import base -from django.core.serializers.base import DeserializedObject -from django.db.models.base import Model -from django.db.models.fields import Field -from django.db.models.fields.related import ForeignKey, ManyToManyField - -class Serializer(base.Serializer): - options: Dict[str, None] - selected_fields: None - stream: django.core.management.base.OutputWrapper - use_natural_foreign_keys: bool - use_natural_primary_keys: bool - def indent(self, level: int) -> None: ... - xml: django.utils.xmlutils.SimplerXMLGenerator = ... - def start_serialization(self) -> None: ... - def end_serialization(self) -> None: ... - def start_object(self, obj: Model) -> None: ... - def end_object(self, obj: Model) -> None: ... - def handle_field(self, obj: Model, field: Field) -> None: ... - def handle_fk_field(self, obj: Model, field: ForeignKey) -> None: ... - def handle_m2m_field(self, obj: Model, field: ManyToManyField) -> None: ... - -class Deserializer(base.Deserializer): - options: Dict[Any, Any] - stream: _io.BufferedReader - event_stream: Any = ... - db: Any = ... - ignore: Any = ... - def __init__( - self, - stream_or_string: Union[BufferedReader, TextIOWrapper, str], - *, - using: Any = ..., - ignorenonexistent: bool = ..., - **options: Any - ) -> None: ... - def __next__(self) -> DeserializedObject: ... - -def getInnerText(node: Element) -> str: ... - -class DefusedExpatParser(_ExpatParser): - def __init__(self, *args: Any, **kwargs: Any) -> None: ... - def start_doctype_decl(self, name: str, sysid: str, pubid: None, has_internal_subset: int) -> Any: ... - def entity_decl( - self, name: Any, is_parameter_entity: Any, value: Any, base: Any, sysid: Any, pubid: Any, notation_name: Any - ) -> None: ... - def unparsed_entity_decl(self, name: Any, base: Any, sysid: Any, pubid: Any, notation_name: Any) -> None: ... - def external_entity_ref_handler(self, context: Any, base: Any, sysid: Any, pubid: Any) -> None: ... - def reset(self) -> None: ... - -class DefusedXmlException(ValueError): ... - -class DTDForbidden(DefusedXmlException): - name: str = ... - sysid: str = ... - pubid: None = ... - def __init__(self, name: str, sysid: str, pubid: None) -> None: ... - -class EntitiesForbidden(DefusedXmlException): - name: Any = ... - value: Any = ... - base: Any = ... - sysid: Any = ... - pubid: Any = ... - notation_name: Any = ... - def __init__(self, name: Any, value: Any, base: Any, sysid: Any, pubid: Any, notation_name: Any) -> None: ... - -class ExternalReferenceForbidden(DefusedXmlException): - context: Any = ... - base: Any = ... - sysid: Any = ... - pubid: Any = ... - def __init__(self, context: Any, base: Any, sysid: Any, pubid: Any) -> None: ... diff --git a/django-stubs-generated/core/servers/__init__.pyi b/django-stubs-generated/core/servers/__init__.pyi deleted file mode 100644 index e69de29..0000000 diff --git a/django-stubs-generated/core/servers/basehttp.pyi b/django-stubs-generated/core/servers/basehttp.pyi deleted file mode 100644 index 493c0ac..0000000 --- a/django-stubs-generated/core/servers/basehttp.pyi +++ /dev/null @@ -1,37 +0,0 @@ -import socketserver -from io import BytesIO -from typing import Any, Dict -from wsgiref import simple_server - -from django.core.handlers.wsgi import WSGIRequest - -class WSGIServer(simple_server.WSGIServer): - request_queue_size: int = ... - address_family: Any = ... - allow_reuse_address: Any = ... - def __init__(self, *args: Any, ipv6: bool = ..., allow_reuse_address: bool = ..., **kwargs: Any) -> None: ... - def handle_error(self, request: Any, client_address: Any) -> None: ... - -class ThreadedWSGIServer(socketserver.ThreadingMixIn, WSGIServer): ... - -class ServerHandler(simple_server.ServerHandler): - http_version: str = ... - def handle_error(self) -> None: ... - -class WSGIRequestHandler(simple_server.WSGIRequestHandler): - client_address: str - close_connection: bool - connection: WSGIRequest - request: WSGIRequest - rfile: BytesIO - server: None - wfile: socketserver._SocketWriter - protocol_version: str = ... - def address_string(self) -> str: ... - def log_message(self, format: str, *args: Any) -> None: ... - def get_environ(self) -> Dict[str, str]: ... - raw_requestline: bytes = ... - requestline: str = ... - request_version: str = ... - command: None = ... - def handle(self) -> None: ... diff --git a/django-stubs-generated/core/signing.pyi b/django-stubs-generated/core/signing.pyi deleted file mode 100644 index 58258ed..0000000 --- a/django-stubs-generated/core/signing.pyi +++ /dev/null @@ -1,48 +0,0 @@ -from datetime import datetime -from typing import Any, Dict, List, Optional, Type, Union - -from django.contrib.sessions.serializers import PickleSerializer - -class BadSignature(Exception): ... -class SignatureExpired(BadSignature): ... - -def b64_encode(s: bytes) -> bytes: ... -def b64_decode(s: bytes) -> bytes: ... -def base64_hmac(salt: str, value: Union[bytes, str], key: Union[bytes, str]) -> str: ... -def get_cookie_signer(salt: str = ...) -> TimestampSigner: ... - -class JSONSerializer: - def dumps(self, obj: Union[Dict[str, Union[int, str]], List[str], str]) -> bytes: ... - def loads(self, data: bytes) -> Dict[str, Union[int, str]]: ... - -def dumps( - obj: Union[Dict[str, Union[datetime, str]], List[str], str], - key: None = ..., - salt: str = ..., - serializer: Type[Union[PickleSerializer, JSONSerializer]] = ..., - compress: bool = ..., -) -> str: ... -def loads( - s: str, - key: None = ..., - salt: str = ..., - serializer: Type[Union[PickleSerializer, JSONSerializer]] = ..., - max_age: Optional[int] = ..., -) -> Union[Dict[str, Union[datetime, str]], Dict[str, Union[int, str]], List[str], str]: ... - -class Signer: - key: str = ... - sep: str = ... - salt: Any = ... - def __init__(self, key: Optional[Union[bytes, str]] = ..., sep: str = ..., salt: Optional[str] = ...) -> None: ... - def signature(self, value: Union[bytes, str]) -> str: ... - def sign(self, value: str) -> str: ... - def unsign(self, signed_value: str) -> str: ... - -class TimestampSigner(Signer): - key: str - salt: str - sep: str - def timestamp(self) -> str: ... - def sign(self, value: str) -> str: ... - def unsign(self, value: str, max_age: Optional[int] = ...) -> str: ... diff --git a/django-stubs-generated/core/validators.pyi b/django-stubs-generated/core/validators.pyi deleted file mode 100644 index 23b6a70..0000000 --- a/django-stubs-generated/core/validators.pyi +++ /dev/null @@ -1,143 +0,0 @@ -from datetime import datetime -from decimal import Decimal -from re import RegexFlag -from typing import Any, Dict, List, Optional, Union -from uuid import UUID - -from django.core.files.base import File - -EMPTY_VALUES: Any - -class RegexValidator: - regex: django.utils.functional.SimpleLazyObject = ... - message: Any = ... - code: str = ... - inverse_match: bool = ... - flags: int = ... - def __init__( - self, - regex: Optional[str] = ..., - message: Optional[str] = ..., - code: Optional[str] = ..., - inverse_match: Optional[bool] = ..., - flags: Optional[RegexFlag] = ..., - ) -> None: ... - def __call__(self, value: Optional[Union[float, str]]) -> None: ... - def __eq__(self, other: Union[ProhibitNullCharactersValidator, RegexValidator]) -> bool: ... - -class URLValidator(RegexValidator): - ul: str = ... - ipv4_re: str = ... - ipv6_re: str = ... - hostname_re: Any = ... - domain_re: Any = ... - tld_re: Any = ... - host_re: Any = ... - regex: django.utils.functional.SimpleLazyObject = ... - message: Any = ... - schemes: Any = ... - def __init__(self, schemes: Optional[List[str]] = ..., **kwargs: Any) -> None: ... - def __call__(self, value: str) -> None: ... - -integer_validator: Any - -def validate_integer(value: Optional[Union[float, str]]) -> None: ... - -class EmailValidator: - message: Any = ... - code: str = ... - user_regex: Any = ... - domain_regex: Any = ... - literal_regex: Any = ... - domain_whitelist: Any = ... - def __init__( - self, message: Optional[str] = ..., code: Optional[str] = ..., whitelist: Optional[List[str]] = ... - ) -> None: ... - def __call__(self, value: Optional[str]) -> None: ... - def validate_domain_part(self, domain_part: str) -> bool: ... - def __eq__(self, other: EmailValidator) -> bool: ... - -validate_email: Any -slug_re: Any -validate_slug: Any -slug_unicode_re: Any -validate_unicode_slug: Any - -def validate_ipv4_address(value: str) -> None: ... -def validate_ipv6_address(value: str) -> None: ... -def validate_ipv46_address(value: str) -> None: ... - -ip_address_validator_map: Any - -def ip_address_validators(protocol: str, unpack_ipv4: bool) -> Any: ... -def int_list_validator( - sep: str = ..., message: None = ..., code: str = ..., allow_negative: bool = ... -) -> RegexValidator: ... - -validate_comma_separated_integer_list: Any - -class BaseValidator: - message: Any = ... - code: str = ... - limit_value: bool = ... - def __init__( - self, limit_value: Optional[Union[datetime, Decimal, float, str]], message: Optional[str] = ... - ) -> None: ... - def __call__(self, value: Union[bytes, datetime, Decimal, float, str]) -> None: ... - def __eq__(self, other: BaseValidator) -> bool: ... - def compare(self, a: bool, b: bool) -> bool: ... - def clean(self, x: Union[datetime, Decimal, float]) -> Union[datetime, Decimal, float]: ... - -class MaxValueValidator(BaseValidator): - limit_value: decimal.Decimal - message: Any = ... - code: str = ... - def compare(self, a: Union[datetime, Decimal, float], b: Union[datetime, Decimal, float]) -> bool: ... - -class MinValueValidator(BaseValidator): - limit_value: int - message: Any = ... - code: str = ... - def compare(self, a: Union[datetime, Decimal, float], b: Union[datetime, Decimal, float]) -> bool: ... - -class MinLengthValidator(BaseValidator): - limit_value: int - message: Any = ... - code: str = ... - def compare(self, a: int, b: int) -> bool: ... - def clean(self, x: str) -> int: ... - -class MaxLengthValidator(BaseValidator): - limit_value: int - message: Any = ... - code: str = ... - def compare(self, a: int, b: int) -> bool: ... - def clean(self, x: Union[bytes, str]) -> int: ... - -class DecimalValidator: - messages: Any = ... - max_digits: int = ... - decimal_places: int = ... - def __init__(self, max_digits: Optional[Union[int, str]], decimal_places: Optional[Union[int, str]]) -> None: ... - def __call__(self, value: Decimal) -> None: ... - def __eq__(self, other: Union[DecimalValidator, MinValueValidator]) -> bool: ... - -class FileExtensionValidator: - message: Any = ... - code: str = ... - allowed_extensions: List[str] = ... - def __init__( - self, allowed_extensions: Optional[List[str]] = ..., message: Optional[str] = ..., code: Optional[str] = ... - ) -> None: ... - def __call__(self, value: File) -> None: ... - def __eq__(self, other: FileExtensionValidator) -> bool: ... - -def get_available_image_extensions() -> List[str]: ... -def validate_image_file_extension(value: File) -> None: ... - -class ProhibitNullCharactersValidator: - message: Any = ... - code: str = ... - def __init__(self, message: Optional[str] = ..., code: Optional[str] = ...) -> None: ... - def __call__(self, value: Optional[Union[Dict[Any, Any], str, UUID]]) -> None: ... - def __eq__(self, other: Union[ProhibitNullCharactersValidator, RegexValidator]) -> bool: ... diff --git a/django-stubs-generated/core/wsgi.pyi b/django-stubs-generated/core/wsgi.pyi deleted file mode 100644 index e9f38f6..0000000 --- a/django-stubs-generated/core/wsgi.pyi +++ /dev/null @@ -1,5 +0,0 @@ -from typing import Optional - -from django.core.handlers.wsgi import WSGIHandler - -def get_wsgi_application() -> WSGIHandler: ... diff --git a/django-stubs-generated/db/backends/base/creation.pyi b/django-stubs-generated/db/backends/base/creation.pyi index c51c1aa..8904232 100644 --- a/django-stubs-generated/db/backends/base/creation.pyi +++ b/django-stubs-generated/db/backends/base/creation.pyi @@ -5,7 +5,7 @@ from django.db.backends.base.base import BaseDatabaseWrapper TEST_DATABASE_PREFIX: str class BaseDatabaseCreation: - connection: django.db.backends.sqlite3.base.DatabaseWrapper = ... + connection: Any = ... def __init__(self, connection: BaseDatabaseWrapper) -> None: ... def create_test_db( self, verbosity: int = ..., autoclobber: bool = ..., serialize: bool = ..., keepdb: bool = ... diff --git a/django-stubs-generated/db/backends/base/operations.pyi b/django-stubs-generated/db/backends/base/operations.pyi index e5046b7..9bed94f 100644 --- a/django-stubs-generated/db/backends/base/operations.pyi +++ b/django-stubs-generated/db/backends/base/operations.pyi @@ -24,7 +24,7 @@ class BaseDatabaseOperations: UNBOUNDED_FOLLOWING: Any = ... CURRENT_ROW: str = ... explain_prefix: Any = ... - connection: django.db.DefaultConnectionProxy = ... + connection: Any = ... def __init__(self, connection: Union[DefaultConnectionProxy, BaseDatabaseWrapper]) -> None: ... def autoinc_sql(self, table: str, column: str) -> None: ... def bulk_batch_size(self, fields: Any, objs: Any): ... diff --git a/django-stubs-generated/db/backends/base/validation.pyi b/django-stubs-generated/db/backends/base/validation.pyi index ff22761..d5d1b97 100644 --- a/django-stubs-generated/db/backends/base/validation.pyi +++ b/django-stubs-generated/db/backends/base/validation.pyi @@ -4,7 +4,7 @@ from django.db.backends.base.base import BaseDatabaseWrapper from django.db.models.fields import Field class BaseDatabaseValidation: - connection: django.db.backends.sqlite3.base.DatabaseWrapper = ... + connection: Any = ... def __init__(self, connection: BaseDatabaseWrapper) -> None: ... def check(self, **kwargs: Any) -> List[Any]: ... def check_field(self, field: Field, **kwargs: Any) -> List[Any]: ... diff --git a/django-stubs-generated/db/backends/sqlite3/creation.pyi b/django-stubs-generated/db/backends/sqlite3/creation.pyi index 48c0f24..02b0cfd 100644 --- a/django-stubs-generated/db/backends/sqlite3/creation.pyi +++ b/django-stubs-generated/db/backends/sqlite3/creation.pyi @@ -3,7 +3,7 @@ from typing import Any, Optional, Tuple from django.db.backends.base.creation import BaseDatabaseCreation class DatabaseCreation(BaseDatabaseCreation): - connection: django.db.backends.sqlite3.base.DatabaseWrapper + connection: Any @staticmethod def is_in_memory_db(database_name: str) -> bool: ... def get_test_db_clone_settings(self, suffix: Any): ... diff --git a/django-stubs-generated/db/backends/sqlite3/features.pyi b/django-stubs-generated/db/backends/sqlite3/features.pyi index 7a82651..3428d3b 100644 --- a/django-stubs-generated/db/backends/sqlite3/features.pyi +++ b/django-stubs-generated/db/backends/sqlite3/features.pyi @@ -3,7 +3,7 @@ from typing import Optional from django.db.backends.base.features import BaseDatabaseFeatures class DatabaseFeatures(BaseDatabaseFeatures): - connection: django.db.backends.sqlite3.base.DatabaseWrapper + connection: Any can_use_chunked_reads: bool = ... test_db_allows_multiple_connections: bool = ... supports_unspecified_pk: bool = ... diff --git a/django-stubs-generated/db/backends/sqlite3/introspection.pyi b/django-stubs-generated/db/backends/sqlite3/introspection.pyi index 7329a30..e38d5e8 100644 --- a/django-stubs-generated/db/backends/sqlite3/introspection.pyi +++ b/django-stubs-generated/db/backends/sqlite3/introspection.pyi @@ -13,7 +13,7 @@ class FlexibleFieldLookupDict: def __getitem__(self, key: str) -> Union[Tuple[str, Dict[str, int]], str]: ... class DatabaseIntrospection(BaseDatabaseIntrospection): - connection: django.db.backends.sqlite3.base.DatabaseWrapper + connection: Any data_types_reverse: Any = ... def get_table_list(self, cursor: CursorWrapper) -> List[TableInfo]: ... def get_table_description(self, cursor: CursorWrapper, table_name: str) -> List[FieldInfo]: ... diff --git a/django-stubs-generated/db/backends/sqlite3/operations.pyi b/django-stubs-generated/db/backends/sqlite3/operations.pyi index a990647..93908a9 100644 --- a/django-stubs-generated/db/backends/sqlite3/operations.pyi +++ b/django-stubs-generated/db/backends/sqlite3/operations.pyi @@ -12,7 +12,7 @@ from django.db.models.fields import Field from django.utils.datastructures import ImmutableList class DatabaseOperations(BaseDatabaseOperations): - connection: django.db.backends.sqlite3.base.DatabaseWrapper + connection: Any cast_char_field_without_max_length: str = ... cast_data_types: Any = ... explain_prefix: str = ... diff --git a/django-stubs-generated/db/backends/sqlite3/schema.pyi b/django-stubs-generated/db/backends/sqlite3/schema.pyi index acacbb8..7b52dad 100644 --- a/django-stubs-generated/db/backends/sqlite3/schema.pyi +++ b/django-stubs-generated/db/backends/sqlite3/schema.pyi @@ -7,7 +7,7 @@ from django.db.models.fields import Field class DatabaseSchemaEditor(BaseDatabaseSchemaEditor): atomic_migration: bool collect_sql: bool - connection: django.db.backends.sqlite3.base.DatabaseWrapper + connection: Any sql_delete_table: str = ... sql_create_fk: Any = ... sql_create_inline_fk: str = ... diff --git a/django-stubs-generated/db/backends/utils.pyi b/django-stubs-generated/db/backends/utils.pyi index 315facd..bb0395b 100644 --- a/django-stubs-generated/db/backends/utils.pyi +++ b/django-stubs-generated/db/backends/utils.pyi @@ -8,7 +8,7 @@ logger: Any class CursorWrapper: cursor: django.db.backends.sqlite3.base.SQLiteCursorWrapper = ... - db: django.db.backends.sqlite3.base.DatabaseWrapper = ... + db: Any = ... def __init__(self, cursor: SQLiteCursorWrapper, db: DatabaseWrapper) -> None: ... WRAP_ERROR_ATTRS: Any = ... def __getattr__(self, attr: str) -> Union[Callable, Tuple[Tuple[str, None, None, None, None, None, None]], int]: ... @@ -25,7 +25,7 @@ class CursorWrapper: class CursorDebugWrapper(CursorWrapper): cursor: django.db.backends.sqlite3.base.SQLiteCursorWrapper - db: django.db.backends.sqlite3.base.DatabaseWrapper + db: Any def execute(self, sql: str, params: Optional[Union[List[str], Tuple]] = ...) -> Any: ... def executemany(self, sql: str, param_list: Iterator[Any]) -> Any: ... diff --git a/django-stubs-generated/db/models/options.pyi b/django-stubs-generated/db/models/options.pyi index 45d2359..325299c 100644 --- a/django-stubs-generated/db/models/options.pyi +++ b/django-stubs-generated/db/models/options.pyi @@ -86,7 +86,7 @@ class Options: parents: collections.OrderedDict = ... auto_created: bool = ... related_fkey_lookups: List[Any] = ... - apps: django.apps.registry.Apps = ... + apps: Apps = ... default_related_name: None = ... def __init__( self, @@ -104,7 +104,7 @@ class Options: @property def installed(self): ... model: Type[django.db.models.base.Model] = ... - original_attrs: Dict[str, Union[List[str], django.apps.registry.Apps, str]] = ... + original_attrs: Dict[str, Union[List[str], Apps, str]] = ... def contribute_to_class(self, cls: Type[Model], name: str) -> None: ... def add_manager(self, manager: Manager) -> None: ... def add_field(self, field: Union[GenericForeignKey, Field], private: bool = ...) -> None: ... diff --git a/django-stubs-generated/db/models/sql/where.pyi b/django-stubs-generated/db/models/sql/where.pyi index 883d680..1b0ea30 100644 --- a/django-stubs-generated/db/models/sql/where.pyi +++ b/django-stubs-generated/db/models/sql/where.pyi @@ -21,9 +21,7 @@ class WhereNode(tree.Node): resolved: bool = ... conditional: bool = ... def split_having(self, negated: bool = ...) -> Tuple[Optional[WhereNode], Optional[WhereNode]]: ... - def as_sql( - self, compiler: SQLCompiler, connection: Union[DefaultConnectionProxy, DatabaseWrapper] - ) -> Tuple[str, List[Union[int, str]]]: ... + def as_sql(self, compiler: SQLCompiler, connection: Any) -> Tuple[str, List[Union[int, str]]]: ... def get_group_by_cols(self) -> List[Expression]: ... def get_source_expressions(self) -> List[FieldGetDbPrepValueMixin]: ... children: List[Union[django.db.models.lookups.BuiltinLookup, django.db.models.sql.where.WhereNode]] = ... @@ -39,9 +37,7 @@ class WhereNode(tree.Node): class NothingNode: contains_aggregate: bool = ... - def as_sql( - self, compiler: SQLCompiler = ..., connection: Union[DefaultConnectionProxy, DatabaseWrapper] = ... - ) -> Any: ... + def as_sql(self, compiler: SQLCompiler = ..., connection: Any = ...) -> Any: ... class ExtraWhere: contains_aggregate: bool = ... diff --git a/django-stubs-generated/db/utils.pyi b/django-stubs-generated/db/utils.pyi index 193b9d4..604c103 100644 --- a/django-stubs-generated/db/utils.pyi +++ b/django-stubs-generated/db/utils.pyi @@ -20,7 +20,7 @@ class ProgrammingError(DatabaseError): ... class NotSupportedError(DatabaseError): ... class DatabaseErrorWrapper: - wrapper: django.db.backends.sqlite3.base.DatabaseWrapper = ... + wrapper: Any = ... def __init__(self, wrapper: DatabaseWrapper) -> None: ... def __enter__(self) -> None: ... def __exit__(self, exc_type: None, exc_value: None, traceback: None) -> None: ... diff --git a/django-stubs-generated/http/__init__.pyi b/django-stubs-generated/http/__init__.pyi deleted file mode 100644 index 02117bc..0000000 --- a/django-stubs-generated/http/__init__.pyi +++ /dev/null @@ -1,24 +0,0 @@ -from django.http.cookie import SimpleCookie as SimpleCookie, parse_cookie as parse_cookie -from django.http.request import ( - HttpRequest as HttpRequest, - QueryDict as QueryDict, - RawPostDataException as RawPostDataException, - UnreadablePostError as UnreadablePostError, -) -from django.http.response import ( - BadHeaderError as BadHeaderError, - FileResponse as FileResponse, - Http404 as Http404, - HttpResponse as HttpResponse, - HttpResponseBadRequest as HttpResponseBadRequest, - HttpResponseForbidden as HttpResponseForbidden, - HttpResponseGone as HttpResponseGone, - HttpResponseNotAllowed as HttpResponseNotAllowed, - HttpResponseNotFound as HttpResponseNotFound, - HttpResponseNotModified as HttpResponseNotModified, - HttpResponsePermanentRedirect as HttpResponsePermanentRedirect, - HttpResponseRedirect as HttpResponseRedirect, - HttpResponseServerError as HttpResponseServerError, - JsonResponse as JsonResponse, - StreamingHttpResponse as StreamingHttpResponse, -) diff --git a/django-stubs-generated/http/cookie.pyi b/django-stubs-generated/http/cookie.pyi deleted file mode 100644 index e2dc91d..0000000 --- a/django-stubs-generated/http/cookie.pyi +++ /dev/null @@ -1,5 +0,0 @@ -from typing import Any, Dict - -SimpleCookie: Any - -def parse_cookie(cookie: str) -> Dict[str, str]: ... diff --git a/django-stubs-generated/http/multipartparser.pyi b/django-stubs-generated/http/multipartparser.pyi deleted file mode 100644 index 71f34bd..0000000 --- a/django-stubs-generated/http/multipartparser.pyi +++ /dev/null @@ -1,53 +0,0 @@ -from io import BytesIO, StringIO -from typing import Any, Dict, Iterator, List, Optional, Tuple, Union - -from django.core.handlers.wsgi import WSGIRequest -from django.http.request import QueryDict -from django.utils.datastructures import ImmutableList, MultiValueDict - -class MultiPartParserError(Exception): ... -class InputStreamExhausted(Exception): ... - -class MultiPartParser: - def __init__( - self, - META: Dict[str, Any], - input_data: Union[BytesIO, StringIO, WSGIRequest], - upload_handlers: Union[List[Any], ImmutableList], - encoding: Optional[str] = ..., - ) -> None: ... - def parse(self) -> Tuple[QueryDict, MultiValueDict]: ... - def handle_file_complete(self, old_field_name: str, counters: List[int]) -> None: ... - def IE_sanitize(self, filename: str) -> str: ... - -class LazyStream: - length: None = ... - position: int = ... - def __init__(self, producer: Union[BoundaryIter, ChunkIter], length: None = ...) -> None: ... - def tell(self): ... - def read(self, size: Optional[int] = ...) -> bytes: ... - def __next__(self) -> bytes: ... - def close(self) -> None: ... - def __iter__(self) -> LazyStream: ... - def unget(self, bytes: bytes) -> None: ... - -class ChunkIter: - flo: Union[_io.BytesIO, django.core.handlers.wsgi.WSGIRequest] = ... - chunk_size: int = ... - def __init__(self, flo: Union[BytesIO, WSGIRequest], chunk_size: int = ...) -> None: ... - def __next__(self) -> bytes: ... - def __iter__(self): ... - -class InterBoundaryIter: - def __init__(self, stream: LazyStream, boundary: bytes) -> None: ... - def __iter__(self) -> InterBoundaryIter: ... - def __next__(self) -> LazyStream: ... - -class BoundaryIter: - def __init__(self, stream: LazyStream, boundary: bytes) -> None: ... - def __iter__(self): ... - def __next__(self) -> bytes: ... - -class Parser: - def __init__(self, stream: LazyStream, boundary: bytes) -> None: ... - def __iter__(self) -> Iterator[Tuple[str, Dict[str, Tuple[str, Dict[str, Union[bytes, str]]]], LazyStream]]: ... diff --git a/django-stubs-generated/http/request.pyi b/django-stubs-generated/http/request.pyi deleted file mode 100644 index 8405f78..0000000 --- a/django-stubs-generated/http/request.pyi +++ /dev/null @@ -1,99 +0,0 @@ -from io import BytesIO -from typing import Any, Dict, Iterator, List, Optional, Tuple, Union, Callable - -from django.contrib.sessions.backends.db import SessionStore -from django.core.handlers.wsgi import WSGIRequest -from django.utils.datastructures import MultiValueDict - -RAISE_ERROR: Any -host_validation_re: Any - -class UnreadablePostError(IOError): ... -class RawPostDataException(Exception): ... - -class HttpRequest: - csrf_cookie_needs_reset: bool - csrf_processing_done: bool - get_host: Callable - sensitive_post_parameters: str - session: SessionStore - GET: Union[Dict[str, str], QueryDict] = ... - POST: Union[Dict[str, str], QueryDict] = ... - COOKIES: Dict[str, str] = ... - META: Dict[str, Union[int, str]] = ... - FILES: MultiValueDict = ... - path: str = ... - path_info: str = ... - method: Optional[str] = ... - resolver_match: None = ... - content_type: None = ... - content_params: None = ... - def __init__(self) -> None: ... - def get_host(self) -> str: ... - def get_port(self) -> str: ... - def get_full_path(self, force_append_slash: bool = ...) -> str: ... - def get_full_path_info(self, force_append_slash: bool = ...) -> str: ... - def get_signed_cookie( - self, key: str, default: Any = ..., salt: str = ..., max_age: Optional[int] = ... - ) -> Optional[str]: ... - def get_raw_uri(self) -> str: ... - def build_absolute_uri(self, location: Optional[str] = ...) -> str: ... - @property - def scheme(self) -> Optional[str]: ... - def is_secure(self) -> bool: ... - def is_ajax(self) -> bool: ... - @property - def encoding(self): ... - @encoding.setter - def encoding(self, val: Any) -> None: ... - @property - def upload_handlers(self): ... - @upload_handlers.setter - def upload_handlers(self, upload_handlers: Any) -> None: ... - upload_handlers: Any = ... - def parse_file_upload( - self, META: Dict[str, Any], post_data: Union[BytesIO, WSGIRequest] - ) -> Tuple[QueryDict, MultiValueDict]: ... - @property - def body(self) -> bytes: ... - def close(self) -> None: ... - def read(self, *args: Any, **kwargs: Any) -> bytes: ... - def readline(self, *args: Any, **kwargs: Any) -> bytes: ... - def __iter__(self) -> Iterator[bytes]: ... - def xreadlines(self) -> None: ... - def readlines(self): ... - -class QueryDict(MultiValueDict): - encoding: Any = ... - def __init__( - self, query_string: Optional[Union[bytes, str]] = ..., mutable: bool = ..., encoding: Optional[str] = ... - ) -> None: ... - @classmethod - def fromkeys( - cls, - iterable: Union[List[bytes], List[str], int, str], - value: Union[bytes, str] = ..., - mutable: bool = ..., - encoding: Optional[str] = ..., - ) -> QueryDict: ... - @property - def encoding(self): ... - @encoding.setter - def encoding(self, value: Any) -> None: ... - def __setitem__(self, key: str, value: Optional[Union[int, str]]) -> None: ... - def __delitem__(self, key: str) -> None: ... - def __copy__(self) -> QueryDict: ... - def __deepcopy__(self, memo: Dict[Any, Any]) -> QueryDict: ... - def setlist(self, key: str, list_: List[str]) -> None: ... - def setlistdefault(self, key: str, default_list: None = ...) -> List[str]: ... - def appendlist(self, key: Union[bytes, str], value: Union[List[str], bytes, str]) -> None: ... - def pop(self, key: str, *args: Any) -> Optional[Union[List[str], str]]: ... - def popitem(self) -> Any: ... - def clear(self) -> None: ... - def setdefault(self, key: str, default: str = ...) -> str: ... - def copy(self) -> QueryDict: ... - def urlencode(self, safe: Optional[str] = ...) -> str: ... - -def bytes_to_text(s: Optional[Union[bytes, int, str]], encoding: str) -> Optional[Union[int, str]]: ... -def split_domain_port(host: str) -> Tuple[str, str]: ... -def validate_host(host: str, allowed_hosts: Union[List[str], str]) -> bool: ... diff --git a/django-stubs-generated/http/response.pyi b/django-stubs-generated/http/response.pyi deleted file mode 100644 index 2d41163..0000000 --- a/django-stubs-generated/http/response.pyi +++ /dev/null @@ -1,264 +0,0 @@ -import functools -import io -import tempfile -from datetime import datetime -from io import BufferedReader, BytesIO -from tempfile import _TemporaryFileWrapper -from typing import Any, Dict, List, Optional, Tuple, Type, Union -from http import cookies - -from django.core.files.base import ContentFile -from django.core.handlers.wsgi import WSGIRequest -from django.core.serializers.json import DjangoJSONEncoder -from django.template import Template -from django.template.context import Context -from django.test import Client -from django.test.client import FakePayload -from django.urls import ResolverMatch - -class BadHeaderError(ValueError): ... - -class HttpResponseBase: - status_code: int = ... - cookies: cookies.SimpleCookie = ... - closed: bool = ... - def __init__( - self, - content_type: Optional[str] = ..., - status: Any = ..., - reason: Optional[str] = ..., - charset: Optional[str] = ..., - ) -> None: ... - @property - def reason_phrase(self): ... - @reason_phrase.setter - def reason_phrase(self, value: Any) -> None: ... - @property - def charset(self): ... - @charset.setter - def charset(self, value: Any) -> None: ... - def serialize_headers(self) -> bytes: ... - __bytes__: Any = ... - def __setitem__(self, header: Union[bytes, str], value: Union[bytes, int, str]) -> None: ... - def __delitem__(self, header: str) -> None: ... - def __getitem__(self, header: str) -> str: ... - def has_header(self, header: str) -> bool: ... - __contains__: Any = ... - def items(self): ... - def get(self, header: str, alternate: Optional[Union[Tuple, str]] = ...) -> Optional[Union[Tuple, str]]: ... - def set_cookie( - self, - key: str, - value: str = ..., - max_age: Optional[int] = ..., - expires: Optional[Union[datetime, str]] = ..., - path: str = ..., - domain: Optional[str] = ..., - secure: Optional[bool] = ..., - httponly: Optional[bool] = ..., - samesite: Optional[str] = ..., - ) -> None: ... - def setdefault(self, key: str, value: str) -> None: ... - def set_signed_cookie(self, key: str, value: str, salt: str = ..., **kwargs: Any) -> None: ... - def delete_cookie(self, key: str, path: str = ..., domain: Optional[str] = ...) -> None: ... - def make_bytes(self, value: Union[bytes, int, str]) -> bytes: ... - def close(self) -> None: ... - def write(self, content: str) -> Any: ... - def flush(self) -> None: ... - def tell(self) -> Any: ... - def readable(self) -> bool: ... - def seekable(self) -> bool: ... - def writable(self) -> bool: ... - def writelines(self, lines: List[str]) -> Any: ... - -class HttpResponse(HttpResponseBase): - client: Client - closed: bool - context: Optional[Context] - cookies: cookies.SimpleCookie - csrf_cookie_set: bool - json: functools.partial - redirect_chain: List[Tuple[str, int]] - request: Dict[str, Union[FakePayload, int, str]] - resolver_match: ResolverMatch - sameorigin: bool - status_code: int - templates: List[Template] - test_server_port: str - test_was_secure_request: bool - wsgi_request: WSGIRequest - xframe_options_exempt: bool - streaming: bool = ... - content: Any = ... - def __init__(self, content: Any = ..., *args: Any, **kwargs: Any) -> None: ... - def serialize(self): ... - __bytes__: Any = ... - @property - def content(self): ... - @content.setter - def content(self, value: Any) -> None: ... - def __iter__(self): ... - def write(self, content: Union[bytes, str]) -> None: ... - def tell(self) -> int: ... - def getvalue(self) -> bytes: ... - def writable(self) -> bool: ... - def writelines(self, lines: List[str]) -> None: ... - -class StreamingHttpResponse(HttpResponseBase): - client: Client - closed: bool - context: None - cookies: cookies.SimpleCookie - json: functools.partial - request: Dict[str, Union[FakePayload, int, str]] - resolver_match: ResolverMatch - status_code: int - templates: List[Any] - wsgi_request: WSGIRequest - streaming: bool = ... - streaming_content: Any = ... - def __init__(self, streaming_content: Any = ..., *args: Any, **kwargs: Any) -> None: ... - @property - def content(self) -> Any: ... - @property - def streaming_content(self): ... - @streaming_content.setter - def streaming_content(self, value: Any) -> None: ... - def __iter__(self) -> map: ... - def getvalue(self) -> bytes: ... - -class FileResponse(StreamingHttpResponse): - client: Client - closed: bool - context: None - cookies: cookies.SimpleCookie - file_to_stream: Optional[Union[io.BufferedReader, io.BytesIO, ContentFile, tempfile._TemporaryFileWrapper]] - json: functools.partial - request: Dict[str, str] - resolver_match: ResolverMatch - templates: List[Any] - wsgi_request: WSGIRequest - block_size: int = ... - as_attachment: bool = ... - filename: str = ... - def __init__(self, *args: Any, as_attachment: bool = ..., filename: str = ..., **kwargs: Any) -> None: ... - def set_headers(self, filelike: Union[BufferedReader, BytesIO, ContentFile, _TemporaryFileWrapper]) -> None: ... - -class HttpResponseRedirectBase(HttpResponse): - allowed_schemes: Any = ... - def __init__(self, redirect_to: str, *args: Any, **kwargs: Any) -> None: ... - url: Any = ... - -class HttpResponseRedirect(HttpResponseRedirectBase): - client: Client - closed: bool - context: Optional[Context] - cookies: cookies.SimpleCookie - csrf_cookie_set: bool - json: functools.partial - redirect_chain: List[Tuple[str, int]] - request: Dict[str, Union[Dict[str, str], FakePayload, int, str]] - resolver_match: ResolverMatch - templates: List[Template] - wsgi_request: WSGIRequest - status_code: int = ... - -class HttpResponsePermanentRedirect(HttpResponseRedirectBase): - client: Client - closed: bool - context: None - cookies: cookies.SimpleCookie - json: functools.partial - redirect_chain: List[Tuple[str, int]] - request: Dict[str, str] - resolver_match: ResolverMatch - templates: List[Any] - wsgi_request: WSGIRequest - status_code: int = ... - -class HttpResponseNotModified(HttpResponse): - closed: bool - cookies: cookies.SimpleCookie - wsgi_request: WSGIRequest - status_code: int = ... - def __init__(self, *args: Any, **kwargs: Any) -> None: ... - def content(self, value: Any) -> None: ... - -class HttpResponseBadRequest(HttpResponse): - closed: bool - cookies: cookies.SimpleCookie - wsgi_request: WSGIRequest - status_code: int = ... - -class HttpResponseNotFound(HttpResponse): - client: Client - closed: bool - context: Optional[Context] - cookies: cookies.SimpleCookie - csrf_cookie_set: bool - json: functools.partial - request: Dict[str, str] - resolver_match: ResolverMatch - templates: List[Template] - wsgi_request: WSGIRequest - status_code: int = ... - -class HttpResponseForbidden(HttpResponse): - client: Client - closed: bool - context: Optional[Context] - cookies: cookies.SimpleCookie - csrf_cookie_set: bool - json: functools.partial - request: Dict[str, Union[FakePayload, int, str]] - resolver_match: ResolverMatch - templates: List[Template] - wsgi_request: WSGIRequest - status_code: int = ... - -class HttpResponseNotAllowed(HttpResponse): - closed: bool - cookies: cookies.SimpleCookie - status_code: int = ... - def __init__(self, permitted_methods: Union[List[str], Tuple[str, str]], *args: Any, **kwargs: Any) -> None: ... - -class HttpResponseGone(HttpResponse): - closed: bool - cookies: cookies.SimpleCookie - wsgi_request: WSGIRequest - status_code: int = ... - -class HttpResponseServerError(HttpResponse): - client: Client - closed: bool - context: Context - cookies: cookies.SimpleCookie - csrf_cookie_set: bool - json: functools.partial - request: Dict[str, str] - resolver_match: ResolverMatch - templates: List[Template] - wsgi_request: WSGIRequest - status_code: int = ... - -class Http404(Exception): ... - -class JsonResponse(HttpResponse): - client: Client - closed: bool - context: None - cookies: cookies.SimpleCookie - json: functools.partial - request: Dict[str, Union[FakePayload, int, str]] - resolver_match: ResolverMatch - status_code: int - templates: List[Any] - wsgi_request: WSGIRequest - def __init__( - self, - data: Any, - encoder: Type[DjangoJSONEncoder] = ..., - safe: bool = ..., - json_dumps_params: Optional[Dict[str, int]] = ..., - **kwargs: Any - ) -> None: ... diff --git a/django-stubs/apps/registry.pyi b/django-stubs/apps/registry.pyi index c4fec4b..5518fa8 100644 --- a/django-stubs/apps/registry.pyi +++ b/django-stubs/apps/registry.pyi @@ -1,7 +1,6 @@ import collections from typing import Any, Callable, List, Optional, Tuple, Type, Union, Iterable -from django.apps.config import AppConfig from django.db.migrations.state import AppConfigStub from django.db.models.base import Model diff --git a/django-stubs/conf/__init__.pyi b/django-stubs/conf/__init__.pyi index a8c9149..969d557 100644 --- a/django-stubs/conf/__init__.pyi +++ b/django-stubs/conf/__init__.pyi @@ -10,3 +10,6 @@ class LazySettings(_DjangoConfLazyObject): def configure(self, default_settings: Any = ..., **options: Any) -> Any: ... settings: LazySettings = ... + +class Settings: ... +class UserSettingsHolder: ... diff --git a/django-stubs/contrib/staticfiles/handlers.pyi b/django-stubs/contrib/staticfiles/handlers.pyi index 8625bb1..941c0ec 100644 --- a/django-stubs/contrib/staticfiles/handlers.pyi +++ b/django-stubs/contrib/staticfiles/handlers.pyi @@ -4,7 +4,7 @@ from django.core.handlers.wsgi import WSGIHandler, WSGIRequest class StaticFilesHandler(WSGIHandler): handles_files: bool = ... - application: django.core.handlers.wsgi.WSGIHandler = ... + application: WSGIHandler = ... base_url: Any = ... def __init__(self, application: WSGIHandler) -> None: ... def load_middleware(self) -> None: ... diff --git a/django-stubs/db/backends/base/creation.pyi b/django-stubs/db/backends/base/creation.pyi index c51c1aa..8904232 100644 --- a/django-stubs/db/backends/base/creation.pyi +++ b/django-stubs/db/backends/base/creation.pyi @@ -5,7 +5,7 @@ from django.db.backends.base.base import BaseDatabaseWrapper TEST_DATABASE_PREFIX: str class BaseDatabaseCreation: - connection: django.db.backends.sqlite3.base.DatabaseWrapper = ... + connection: Any = ... def __init__(self, connection: BaseDatabaseWrapper) -> None: ... def create_test_db( self, verbosity: int = ..., autoclobber: bool = ..., serialize: bool = ..., keepdb: bool = ... diff --git a/django-stubs/db/backends/base/operations.pyi b/django-stubs/db/backends/base/operations.pyi index e5046b7..9bed94f 100644 --- a/django-stubs/db/backends/base/operations.pyi +++ b/django-stubs/db/backends/base/operations.pyi @@ -24,7 +24,7 @@ class BaseDatabaseOperations: UNBOUNDED_FOLLOWING: Any = ... CURRENT_ROW: str = ... explain_prefix: Any = ... - connection: django.db.DefaultConnectionProxy = ... + connection: Any = ... def __init__(self, connection: Union[DefaultConnectionProxy, BaseDatabaseWrapper]) -> None: ... def autoinc_sql(self, table: str, column: str) -> None: ... def bulk_batch_size(self, fields: Any, objs: Any): ... diff --git a/django-stubs/db/backends/base/validation.pyi b/django-stubs/db/backends/base/validation.pyi index ff22761..d5d1b97 100644 --- a/django-stubs/db/backends/base/validation.pyi +++ b/django-stubs/db/backends/base/validation.pyi @@ -4,7 +4,7 @@ from django.db.backends.base.base import BaseDatabaseWrapper from django.db.models.fields import Field class BaseDatabaseValidation: - connection: django.db.backends.sqlite3.base.DatabaseWrapper = ... + connection: Any = ... def __init__(self, connection: BaseDatabaseWrapper) -> None: ... def check(self, **kwargs: Any) -> List[Any]: ... def check_field(self, field: Field, **kwargs: Any) -> List[Any]: ... diff --git a/django-stubs/db/migrations/loader.pyi b/django-stubs/db/migrations/loader.pyi index 15c8861..3cf234e 100644 --- a/django-stubs/db/migrations/loader.pyi +++ b/django-stubs/db/migrations/loader.pyi @@ -32,6 +32,6 @@ class MigrationLoader: graph: Any = ... replacements: Any = ... def build_graph(self) -> None: ... - def check_consistent_history(self, connection: Union[DefaultConnectionProxy, DatabaseWrapper]) -> None: ... + def check_consistent_history(self, connection: Any) -> None: ... def detect_conflicts(self) -> Dict[str, Set[str]]: ... def project_state(self, nodes: Optional[Tuple[str, str]] = ..., at_end: bool = ...) -> ProjectState: ... diff --git a/django-stubs/template/backends/django.pyi b/django-stubs/template/backends/django.pyi index 92bc4fc..ee8a13b 100644 --- a/django-stubs/template/backends/django.pyi +++ b/django-stubs/template/backends/django.pyi @@ -19,7 +19,7 @@ class DjangoTemplates(BaseEngine): def get_templatetag_libraries(self, custom_libraries: Dict[str, str]) -> Dict[str, str]: ... class Template: - template: django.template.base.Template = ... + template: Template = ... backend: django.template.backends.django.DjangoTemplates = ... def __init__(self, template: Template, backend: DjangoTemplates) -> None: ... @property diff --git a/django-stubs/template/context.pyi b/django-stubs/template/context.pyi index 2baf217..10cc57b 100644 --- a/django-stubs/template/context.pyi +++ b/django-stubs/template/context.pyi @@ -56,7 +56,7 @@ class Context(BaseContext): use_tz: Optional[bool] = ... template_name: Optional[str] = ... render_context: django.template.context.RenderContext = ... - template: Optional[django.template.base.Template] = ... + template: Optional[Template] = ... def __init__( self, dict_: Any = ..., autoescape: bool = ..., use_l10n: Optional[bool] = ..., use_tz: None = ... ) -> None: ... @@ -66,7 +66,7 @@ class Context(BaseContext): class RenderContext(BaseContext): dicts: List[Dict[Union[django.template.loader_tags.IncludeNode, str], str]] - template: Optional[django.template.base.Template] = ... + template: Optional[Template] = ... def __iter__(self) -> None: ... def __contains__(self, key: Union[CycleNode, str]) -> bool: ... def get(self, key: Union[InclusionNode, str], otherwise: None = ...) -> Optional[Union[Template, BlockContext]]: ... @@ -90,7 +90,7 @@ class RequestContext(Context): use_tz: None = ..., autoescape: bool = ..., ) -> None: ... - template: Optional[django.template.base.Template] = ... + template: Optional[Template] = ... def bind_template(self, template: Template) -> Iterator[None]: ... def new( self, diff --git a/django-stubs/template/library.pyi b/django-stubs/template/library.pyi index 8b2a944..9ad3744 100644 --- a/django-stubs/template/library.pyi +++ b/django-stubs/template/library.pyi @@ -74,7 +74,7 @@ class InclusionNode(TagHelperNode): origin: django.template.base.Origin takes_context: Optional[bool] token: django.template.base.Token - filename: Union[django.template.base.Template, str] = ... + filename: Union[Template, str] = ... def __init__( self, func: Callable, diff --git a/django-stubs/template/response.pyi b/django-stubs/template/response.pyi index b1a7ea0..786a9f5 100644 --- a/django-stubs/template/response.pyi +++ b/django-stubs/template/response.pyi @@ -59,7 +59,7 @@ class TemplateResponse(SimpleTemplateResponse): resolver_match: django.utils.functional.SimpleLazyObject status_code: int template_name: Union[List[str], django.template.backends.django.Template, str] - templates: List[django.template.base.Template] + templates: List[Template] using: Optional[str] wsgi_request: django.core.handlers.wsgi.WSGIRequest rendering_attrs: Any = ... diff --git a/django-stubs/test/__init__.pyi b/django-stubs/test/__init__.pyi index d9c610c..5681bbf 100644 --- a/django-stubs/test/__init__.pyi +++ b/django-stubs/test/__init__.pyi @@ -2,6 +2,7 @@ from .testcases import ( TestCase as TestCase, TransactionTestCase as TransactionTestCase, SimpleTestCase as SimpleTestCase, + LiveServerTestCase as LiveServerTestCase, ) from .utils import override_settings as override_settings diff --git a/django-stubs/test/client.pyi b/django-stubs/test/client.pyi index 75315f3..9765524 100644 --- a/django-stubs/test/client.pyi +++ b/django-stubs/test/client.pyi @@ -1,21 +1,18 @@ -from datetime import date -from typing import Any, Callable, Dict, List, Optional, Union +from io import BytesIO +from typing import Any, Dict, List, Optional, Union, Tuple, Type from django.contrib.auth.models import User from django.contrib.sessions.backends.base import SessionBase from django.core.handlers.base import BaseHandler from django.core.handlers.wsgi import WSGIRequest -from django.dispatch.dispatcher import Signal -from django.http.request import HttpRequest, QueryDict -from django.http.response import HttpResponse, HttpResponseBase, HttpResponseRedirect -from django.template.base import Template -from django.template.context import Context -from django.test.utils import ContextList +from django.core.serializers.json import DjangoJSONEncoder +from django.http.cookie import SimpleCookie +from django.http.response import HttpResponse, HttpResponseBase class RedirectCycleError(Exception): - last_response: django.http.response.HttpResponseRedirect = ... + last_response: HttpResponseBase = ... redirect_chain: List[Tuple[str, int]] = ... - def __init__(self, message: str, last_response: HttpResponseRedirect) -> None: ... + def __init__(self, message: str, last_response: HttpResponseBase) -> None: ... class FakePayload: read_started: bool = ... @@ -33,22 +30,18 @@ def encode_multipart(boundary: str, data: Dict[str, Any]) -> bytes: ... def encode_file(boundary: str, key: str, file: Any) -> List[bytes]: ... class RequestFactory: - json_encoder: Type[django.core.serializers.json.DjangoJSONEncoder] = ... + json_encoder: Type[DjangoJSONEncoder] = ... defaults: Dict[str, str] = ... - cookies: http.cookies.SimpleCookie = ... - errors: _io.BytesIO = ... + cookies: SimpleCookie = ... + errors: BytesIO = ... def __init__(self, *, json_encoder: Any = ..., **defaults: Any) -> None: ... def request(self, **request: Any) -> WSGIRequest: ... - def get( - self, path: str, data: Optional[Union[Dict[str, date], QueryDict, str]] = ..., secure: bool = ..., **extra: Any - ) -> Union[WSGIRequest, HttpResponseBase]: ... + def get(self, path: str, data: Any = ..., secure: bool = ..., **extra: Any) -> HttpResponseBase: ... def post( self, path: str, data: Any = ..., content_type: str = ..., secure: bool = ..., **extra: Any - ) -> Union[WSGIRequest, HttpResponseBase]: ... - def head( - self, path: str, data: Optional[Union[Dict[str, str], str]] = ..., secure: bool = ..., **extra: Any - ) -> Union[WSGIRequest, HttpResponse]: ... - def trace(self, path: str, secure: bool = ..., **extra: Any) -> Union[WSGIRequest, HttpResponse]: ... + ) -> HttpResponseBase: ... + def head(self, path: str, data: Any = ..., secure: bool = ..., **extra: Any) -> HttpResponseBase: ... + def trace(self, path: str, secure: bool = ..., **extra: Any) -> HttpResponseBase: ... def options( self, path: str, @@ -56,46 +49,31 @@ class RequestFactory: content_type: str = ..., secure: bool = ..., **extra: Any - ) -> Union[WSGIRequest, HttpResponse]: ... + ) -> HttpResponseBase: ... def put( - self, - path: str, - data: Union[Dict[str, int], Dict[str, str], bytes, str] = ..., - content_type: str = ..., - secure: bool = ..., - **extra: Any - ) -> Union[WSGIRequest, HttpResponse]: ... + self, path: str, data: Any = ..., content_type: str = ..., secure: bool = ..., **extra: Any + ) -> HttpResponseBase: ... def patch( - self, - path: str, - data: Union[Dict[str, int], Dict[str, str], str] = ..., - content_type: str = ..., - secure: bool = ..., - **extra: Any - ) -> Union[WSGIRequest, HttpResponse]: ... + self, path: str, data: Any = ..., content_type: str = ..., secure: bool = ..., **extra: Any + ) -> HttpResponseBase: ... def delete( - self, - path: str, - data: Union[Dict[str, int], Dict[str, str], str] = ..., - content_type: str = ..., - secure: bool = ..., - **extra: Any - ) -> Union[WSGIRequest, HttpResponse]: ... + self, path: str, data: Any = ..., content_type: str = ..., secure: bool = ..., **extra: Any + ) -> HttpResponseBase: ... def generic( self, method: str, path: str, - data: Union[Dict[str, str], bytes, str] = ..., + data: Any = ..., content_type: Optional[str] = ..., secure: bool = ..., **extra: Any - ) -> Union[WSGIRequest, HttpResponseBase]: ... + ) -> HttpResponseBase: ... class Client(RequestFactory): defaults: Dict[str, str] - errors: _io.BytesIO - json_encoder: Union[Type[django.core.serializers.json.DjangoJSONEncoder], unittest.mock.MagicMock] - handler: django.test.client.ClientHandler = ... + errors: BytesIO + json_encoder: Type[DjangoJSONEncoder] + handler: ClientHandler = ... exc_info: None = ... def __init__(self, enforce_csrf_checks: bool = ..., **defaults: Any) -> None: ... def store_exc_info(self, **kwargs: Any) -> None: ... @@ -103,64 +81,30 @@ class Client(RequestFactory): def session(self) -> SessionBase: ... def request(self, **request: Any) -> Any: ... def get( - self, - path: str, - data: Optional[Union[Dict[str, Union[int, str]], QueryDict, str]] = ..., - follow: bool = ..., - secure: bool = ..., - **extra: Any + self, path: str, data: Any = ..., follow: bool = ..., secure: bool = ..., **extra: Any ) -> HttpResponseBase: ... def post( self, path: str, data: Any = ..., content_type: str = ..., follow: bool = ..., secure: bool = ..., **extra: Any ) -> HttpResponseBase: ... def head( - self, - path: str, - data: Optional[Union[Dict[str, str], str]] = ..., - follow: bool = ..., - secure: bool = ..., - **extra: Any + self, path: str, data: Any = ..., follow: bool = ..., secure: bool = ..., **extra: Any ) -> HttpResponse: ... def options( - self, - path: str, - data: Union[Dict[str, str], str] = ..., - content_type: str = ..., - follow: bool = ..., - secure: bool = ..., - **extra: Any + self, path: str, data: Any = ..., content_type: str = ..., follow: bool = ..., secure: bool = ..., **extra: Any ) -> HttpResponse: ... def put( - self, - path: str, - data: Union[Dict[str, int], Dict[str, str], bytes, str] = ..., - content_type: str = ..., - follow: bool = ..., - secure: bool = ..., - **extra: Any + self, path: str, data: Any = ..., content_type: str = ..., follow: bool = ..., secure: bool = ..., **extra: Any ) -> HttpResponse: ... def patch( - self, - path: str, - data: Union[Dict[str, int], Dict[str, str], str] = ..., - content_type: str = ..., - follow: bool = ..., - secure: bool = ..., - **extra: Any + self, path: str, data: Any = ..., content_type: str = ..., follow: bool = ..., secure: bool = ..., **extra: Any ) -> HttpResponse: ... def delete( - self, - path: str, - data: Union[Dict[str, int], Dict[str, str], str] = ..., - content_type: str = ..., - follow: bool = ..., - secure: bool = ..., - **extra: Any + self, path: str, data: Any = ..., content_type: str = ..., follow: bool = ..., secure: bool = ..., **extra: Any ) -> HttpResponse: ... def trace( - self, path: str, data: Union[Dict[str, str], str] = ..., follow: bool = ..., secure: bool = ..., **extra: Any + self, path: str, data: Any = ..., follow: bool = ..., secure: bool = ..., **extra: Any ) -> HttpResponse: ... def login(self, **credentials: Any) -> bool: ... def force_login(self, user: User, backend: Optional[str] = ...) -> None: ... - cookies: http.cookies.SimpleCookie = ... + cookies: SimpleCookie = ... def logout(self) -> None: ... diff --git a/django-stubs/test/selenium.pyi b/django-stubs/test/selenium.pyi index 167f7d2..fe1092f 100644 --- a/django-stubs/test/selenium.pyi +++ b/django-stubs/test/selenium.pyi @@ -1,4 +1,4 @@ -from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union +from typing import Any, Callable, Dict, List, Tuple, Type, Union from django.test import LiveServerTestCase diff --git a/django-stubs/test/signals.pyi b/django-stubs/test/signals.pyi index 9068818..68162d4 100644 --- a/django-stubs/test/signals.pyi +++ b/django-stubs/test/signals.pyi @@ -1,4 +1,4 @@ -from typing import Any, Optional +from typing import Any template_rendered: Any COMPLEX_OVERRIDE_SETTINGS: Any diff --git a/django-stubs/test/testcases.pyi b/django-stubs/test/testcases.pyi index 6d4b594..d48ab7b 100644 --- a/django-stubs/test/testcases.pyi +++ b/django-stubs/test/testcases.pyi @@ -5,34 +5,34 @@ from datetime import date from typing import Any, Callable, Dict, Iterator, List, Optional, Set, Tuple, Type, Union from unittest.runner import TextTestResult +from django.core.exceptions import ImproperlyConfigured from django.core.handlers.wsgi import WSGIHandler -from django.core.servers.basehttp import WSGIRequestHandler +from django.core.servers.basehttp import WSGIRequestHandler, ThreadedWSGIServer from django.db.backends.sqlite3.base import DatabaseWrapper from django.db.models.base import Model from django.db.models.query import QuerySet, RawQuerySet from django.forms.fields import EmailField from django.http.response import HttpResponse, HttpResponseBase -from django.template.context import Context -from django.test.html import Element -from django.test.utils import CaptureQueriesContext, ContextList, modify_settings, override_settings +from django.template.base import Template +from django.test.utils import CaptureQueriesContext, modify_settings, override_settings, ContextList from django.utils.safestring import SafeText class _AssertNumQueriesContext(CaptureQueriesContext): - connection: django.db.backends.sqlite3.base.DatabaseWrapper + connection: Any final_queries: Optional[int] force_debug_cursor: bool initial_queries: int - test_case: Union[django.test.testcases.SerializeMixin, django.test.testcases.TransactionTestCase] = ... + test_case: SimpleTestCase = ... num: int = ... def __init__(self, test_case: Any, num: Any, connection: Any) -> None: ... def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any): ... class _AssertTemplateUsedContext: - test_case: django.test.testcases.SimpleTestCase = ... + test_case: SimpleTestCase = ... template_name: str = ... - rendered_templates: List[django.template.base.Template] = ... + rendered_templates: List[Template] = ... rendered_template_names: List[str] = ... - context: django.test.utils.ContextList = ... + context: ContextList = ... def __init__(self, test_case: Any, template_name: Any) -> None: ... def on_template_render(self, sender: Any, signal: Any, template: Any, context: Any, **kwargs: Any) -> None: ... def test(self): ... @@ -41,11 +41,11 @@ class _AssertTemplateUsedContext: def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any): ... class _AssertTemplateNotUsedContext(_AssertTemplateUsedContext): - context: django.test.utils.ContextList + context: ContextList rendered_template_names: List[str] - rendered_templates: List[django.template.base.Template] + rendered_templates: List[Template] template_name: str - test_case: django.test.testcases.SimpleTestCase + test_case: SimpleTestCase def test(self): ... def message(self): ... @@ -203,9 +203,9 @@ class LiveServerThread(threading.Thread): host: str = ... port: int = ... is_ready: threading.Event = ... - error: Optional[django.core.exceptions.ImproperlyConfigured] = ... - static_handler: Type[django.core.handlers.wsgi.WSGIHandler] = ... - connections_override: Dict[str, django.db.backends.sqlite3.base.DatabaseWrapper] = ... + error: Optional[ImproperlyConfigured] = ... + static_handler: Type[WSGIHandler] = ... + connections_override: Dict[str, Any] = ... def __init__( self, host: str, @@ -213,7 +213,7 @@ class LiveServerThread(threading.Thread): connections_override: Dict[str, DatabaseWrapper] = ..., port: int = ..., ) -> None: ... - httpd: django.core.servers.basehttp.ThreadedWSGIServer = ... + httpd: ThreadedWSGIServer = ... def run(self) -> None: ... def terminate(self) -> None: ... diff --git a/django-stubs/test/utils.pyi b/django-stubs/test/utils.pyi index 61979c2..74564b2 100644 --- a/django-stubs/test/utils.pyi +++ b/django-stubs/test/utils.pyi @@ -1,19 +1,14 @@ -from collections import OrderedDict -from contextlib import _GeneratorContextManager +import decimal +import warnings from decimal import Decimal -from io import StringIO from typing import Any, Callable, Dict, Iterator, List, Optional, Set, Tuple, Type, Union from django.apps.registry import Apps -from django.conf import LazySettings -from django.db import DefaultConnectionProxy -from django.db.backends.base.base import BaseDatabaseWrapper -from django.db.backends.sqlite3.base import DatabaseWrapper -from django.template.base import Template -from django.template.context import Context +from django.core.checks.registry import CheckRegistry from django.test.runner import DiscoverRunner from django.test.testcases import SimpleTestCase -from django.utils.safestring import SafeText + +from django.conf import LazySettings class Approximate: val: Union[decimal.Decimal, float] = ... @@ -52,7 +47,7 @@ class override_settings(TestContextDecorator): kwarg_name: None options: Dict[str, Any] = ... def __init__(self, **kwargs: Any) -> None: ... - wrapped: Union[django.conf.Settings, django.conf.UserSettingsHolder] = ... + wrapped: Settings = ... def enable(self) -> None: ... def disable(self) -> None: ... def save_options(self, test_func: Type[Union[SimpleTestCase, LoggingCaptureMixin]]) -> None: ... @@ -63,7 +58,7 @@ class override_settings(TestContextDecorator): class modify_settings(override_settings): attr_name: None kwarg_name: None - wrapped: Union[django.conf.Settings, django.conf.UserSettingsHolder] + wrapped: Settings operations: List[Tuple[str, Dict[str, Union[List[str], str]]]] = ... def __init__(self, *args: Any, **kwargs: Any) -> None: ... def save_options(self, test_func: Type[SimpleTestCase]) -> None: ... @@ -73,7 +68,7 @@ class modify_settings(override_settings): class override_system_checks(TestContextDecorator): attr_name: None kwarg_name: None - registry: django.core.checks.registry.CheckRegistry = ... + registry: CheckRegistry = ... new_checks: List[Callable] = ... deployment_checks: Optional[List[Callable]] = ... def __init__(self, new_checks: List[Callable], deployment_checks: Optional[List[Callable]] = ...) -> None: ... @@ -83,8 +78,8 @@ class override_system_checks(TestContextDecorator): def disable(self) -> None: ... class CaptureQueriesContext: - connection: django.db.DefaultConnectionProxy = ... - def __init__(self, connection: Union[DefaultConnectionProxy, DatabaseWrapper]) -> None: ... + connection: Any = ... + def __init__(self, connection: Any) -> None: ... def __iter__(self): ... def __getitem__(self, index: int) -> Dict[str, str]: ... def __len__(self) -> int: ... @@ -99,7 +94,7 @@ class CaptureQueriesContext: class ignore_warnings(TestContextDecorator): attr_name: None kwarg_name: None - ignore_kwargs: Dict[str, Union[Type[django.utils.deprecation.RemovedInDjango30Warning], str]] = ... + ignore_kwargs: Dict[str, Any] = ... filter_func: Callable = ... def __init__(self, **kwargs: Any) -> None: ... catch_warnings: warnings.catch_warnings = ... @@ -131,6 +126,6 @@ class isolate_apps(TestContextDecorator): kwarg_name: Optional[str] installed_apps: Tuple[str] = ... def __init__(self, *installed_apps: Any, **kwargs: Any) -> None: ... - old_apps: django.apps.registry.Apps = ... + old_apps: Apps = ... def enable(self) -> Apps: ... def disable(self) -> None: ...