mirror of
https://github.com/davidhalter/django-stubs.git
synced 2026-10-12 08:00:17 +08:00
move generated stubs to separate directory, too messty
This commit is contained in:
1 parent
7436d641e3
commit
96cd3ddb27
446 files changed
+58
-71
No files matched your search
Whitespace-only changes.
@@ -0,0 +1,9 @@
|
||||
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]: ...
|
||||
@@ -0,0 +1,4 @@
|
||||
from typing import Any, List, Optional
|
||||
|
||||
|
||||
def check_database_backends(*args: Any, **kwargs: Any) -> List[Any]: ...
|
||||
@@ -0,0 +1,50 @@
|
||||
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: ...
|
||||
@@ -0,0 +1,11 @@
|
||||
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]: ...
|
||||
@@ -0,0 +1,45 @@
|
||||
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
|
||||
Whitespace-only changes.
@@ -0,0 +1,39 @@
|
||||
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]: ...
|
||||
@@ -0,0 +1,13 @@
|
||||
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]: ...
|
||||
@@ -0,0 +1,23 @@
|
||||
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]: ...
|
||||
@@ -0,0 +1,13 @@
|
||||
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]: ...
|
||||
@@ -0,0 +1,18 @@
|
||||
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: ...
|
||||
Reference in new issue
Block a user