1+ from importlib .abc import SourceLoader
12from typing import Any , Callable , Dict , List , Optional , Type , Union
3+ from types import TracebackType
24
35from django .core .handlers .wsgi import WSGIRequest
46from django .http .request import QueryDict
@@ -16,8 +18,8 @@ class CallableSettingWrapper:
1618def cleanse_setting (key : Union [int , str ], value : Any ) -> Any : ...
1719def get_safe_settings () -> Dict [str , Any ]: ...
1820def technical_500_response (request : Any , exc_type : Any , exc_value : Any , tb : Any , status_code : int = ...): ...
19- def get_default_exception_reporter_filter () -> SafeExceptionReporterFilter : ...
20- def get_exception_reporter_filter (request : Optional [WSGIRequest ]) -> SafeExceptionReporterFilter : ...
21+ def get_default_exception_reporter_filter () -> ExceptionReporterFilter : ...
22+ def get_exception_reporter_filter (request : Optional [WSGIRequest ]) -> ExceptionReporterFilter : ...
2123
2224class ExceptionReporterFilter :
2325 def get_post_parameters (self , request : Any ): ...
@@ -32,7 +34,7 @@ class SafeExceptionReporterFilter(ExceptionReporterFilter):
3234
3335class ExceptionReporter :
3436 request : Optional [WSGIRequest ] = ...
35- filter : django . views . debug . SafeExceptionReporterFilter = ...
37+ filter : ExceptionReporterFilter = ...
3638 exc_type : None = ...
3739 exc_value : Optional [str ] = ...
3840 tb : None = ...
@@ -41,12 +43,25 @@ class ExceptionReporter:
4143 template_does_not_exist : bool = ...
4244 postmortem : None = ...
4345 def __init__ (
44- self , request : Optional [WSGIRequest ], exc_type : None , exc_value : Optional [str ], tb : None , is_email : bool = ...
46+ self ,
47+ request : Optional [WSGIRequest ],
48+ exc_type : Optional [Type [BaseException ]],
49+ exc_value : Optional [Union [str , BaseException ]],
50+ tb : Optional [TracebackType ],
51+ is_email : bool = ...,
4552 ) -> None : ...
4653 def get_traceback_data (self ) -> Dict [str , Any ]: ...
4754 def get_traceback_html (self ) -> SafeText : ...
4855 def get_traceback_text (self ) -> SafeText : ...
4956 def get_traceback_frames (self ) -> List [Any ]: ...
57+ def _get_lines_from_file (
58+ self ,
59+ filename : str ,
60+ lineno : int ,
61+ context_lines : int ,
62+ loader : Optional [SourceLoader ] = ...,
63+ module_name : Optional [str ] = None ,
64+ ): ...
5065
5166def technical_404_response (request : WSGIRequest , exception : Http404 ) -> HttpResponse : ...
5267def default_urlconf (request : WSGIRequest ) -> HttpResponse : ...
0 commit comments