mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-18 01:45:59 +08:00
better stubs
This commit is contained in:
@@ -1,16 +1,9 @@
|
||||
# Stubs for django.views.debug (Python 3.6)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
from typing import Any, Callable, Dict, List, Optional, Type, Union
|
||||
|
||||
from typing import Any, Optional
|
||||
|
||||
from _frozen_importlib import FrozenImporter
|
||||
from _frozen_importlib_external import SourceFileLoader
|
||||
from django.core.handlers.wsgi import WSGIRequest
|
||||
from django.http.request import QueryDict
|
||||
from django.http.response import Http404, HttpResponseNotFound
|
||||
from django.http.response import Http404, HttpResponse
|
||||
from django.utils.safestring import SafeText
|
||||
from typing import Any, Dict, List, Optional, Tuple, Type, Union
|
||||
|
||||
DEBUG_ENGINE: Any
|
||||
HIDDEN_SETTINGS: Any
|
||||
@@ -18,9 +11,9 @@ CLEANSED_SUBSTITUTE: str
|
||||
CURRENT_DIR: Any
|
||||
|
||||
class CallableSettingWrapper:
|
||||
_wrapped: Any = ...
|
||||
def __init__(self, callable_setting: Type[object]) -> None: ...
|
||||
def __repr__(self) -> str: ...
|
||||
def __init__(
|
||||
self, callable_setting: Union[Callable, Type[Any]]
|
||||
) -> None: ...
|
||||
|
||||
def cleanse_setting(key: Union[str, int], value: Any) -> Any: ...
|
||||
def get_safe_settings() -> Dict[str, Any]: ...
|
||||
@@ -41,20 +34,24 @@ class SafeExceptionReporterFilter(ExceptionReporterFilter):
|
||||
def get_cleansed_multivaluedict(
|
||||
self, request: WSGIRequest, multivaluedict: QueryDict
|
||||
) -> QueryDict: ...
|
||||
def get_post_parameters(self, request: Optional[WSGIRequest]) -> QueryDict: ...
|
||||
def cleanse_special_types(self, request: Optional[WSGIRequest], value: Any) -> Any: ...
|
||||
def get_post_parameters(
|
||||
self, request: Optional[WSGIRequest]
|
||||
) -> Union[Dict[Any, Any], QueryDict]: ...
|
||||
def cleanse_special_types(
|
||||
self, request: Optional[WSGIRequest], value: Any
|
||||
) -> Any: ...
|
||||
def get_traceback_frame_variables(self, request: Any, tb_frame: Any): ...
|
||||
|
||||
class ExceptionReporter:
|
||||
request: Any = ...
|
||||
filter: Any = ...
|
||||
exc_type: Any = ...
|
||||
exc_value: Any = ...
|
||||
tb: Any = ...
|
||||
is_email: Any = ...
|
||||
template_info: Any = ...
|
||||
request: Optional[django.core.handlers.wsgi.WSGIRequest] = ...
|
||||
filter: django.views.debug.SafeExceptionReporterFilter = ...
|
||||
exc_type: None = ...
|
||||
exc_value: Optional[str] = ...
|
||||
tb: None = ...
|
||||
is_email: bool = ...
|
||||
template_info: None = ...
|
||||
template_does_not_exist: bool = ...
|
||||
postmortem: Any = ...
|
||||
postmortem: None = ...
|
||||
def __init__(
|
||||
self,
|
||||
request: Optional[WSGIRequest],
|
||||
@@ -66,21 +63,9 @@ class ExceptionReporter:
|
||||
def get_traceback_data(self) -> Dict[str, Any]: ...
|
||||
def get_traceback_html(self) -> SafeText: ...
|
||||
def get_traceback_text(self) -> SafeText: ...
|
||||
def _get_lines_from_file(
|
||||
self,
|
||||
filename: str,
|
||||
lineno: int,
|
||||
context_lines: int,
|
||||
loader: Optional[Union[SourceFileLoader, Type[FrozenImporter]]] = ...,
|
||||
module_name: str = ...,
|
||||
) -> Union[
|
||||
Tuple[int, List[str], str, List[Any]],
|
||||
Tuple[int, List[str], str, List[str]],
|
||||
Tuple[None, List[Any], None, List[Any]],
|
||||
]: ...
|
||||
def get_traceback_frames(self) -> List[Any]: ...
|
||||
|
||||
def technical_404_response(
|
||||
request: WSGIRequest, exception: Http404
|
||||
) -> HttpResponseNotFound: ...
|
||||
def default_urlconf(request: Any): ...
|
||||
) -> HttpResponse: ...
|
||||
def default_urlconf(request: WSGIRequest) -> HttpResponse: ...
|
||||
|
||||
Reference in New Issue
Block a user