fix errorhandler type check
This commit is contained in:
parent
8ddf80c3ea
commit
470a08b36b
2 changed files with 9 additions and 8 deletions
|
|
@ -1,5 +1,13 @@
|
||||||
.. currentmodule:: flask
|
.. currentmodule:: flask
|
||||||
|
|
||||||
|
Version 2.0.3
|
||||||
|
-------------
|
||||||
|
|
||||||
|
Unreleased
|
||||||
|
|
||||||
|
- Fix type issue with `app.errorhandler` decorator. :issue `4295`
|
||||||
|
|
||||||
|
|
||||||
Version 2.0.2
|
Version 2.0.2
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,11 +46,4 @@ TemplateGlobalCallable = t.Callable[..., t.Any]
|
||||||
TemplateTestCallable = t.Callable[..., bool]
|
TemplateTestCallable = t.Callable[..., bool]
|
||||||
URLDefaultCallable = t.Callable[[str, dict], None]
|
URLDefaultCallable = t.Callable[[str, dict], None]
|
||||||
URLValuePreprocessorCallable = t.Callable[[t.Optional[str], t.Optional[dict]], None]
|
URLValuePreprocessorCallable = t.Callable[[t.Optional[str], t.Optional[dict]], None]
|
||||||
|
ErrorHandlerCallable = t.Callable[[GenericException], ResponseReturnValue]
|
||||||
|
|
||||||
if t.TYPE_CHECKING:
|
|
||||||
import typing_extensions as te
|
|
||||||
|
|
||||||
class ErrorHandlerCallable(te.Protocol[GenericException]):
|
|
||||||
def __call__(self, error: GenericException) -> ResponseReturnValue:
|
|
||||||
...
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue