diff --git a/CHANGES.rst b/CHANGES.rst index 4fec7c54..13790a3a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,5 +1,13 @@ .. currentmodule:: flask +Version 2.0.3 +------------- + +Unreleased + +- Fix type issue with `app.errorhandler` decorator. :issue `4295` + + Version 2.0.2 ------------- diff --git a/src/flask/typing.py b/src/flask/typing.py index f1c84670..93896f80 100644 --- a/src/flask/typing.py +++ b/src/flask/typing.py @@ -46,11 +46,4 @@ TemplateGlobalCallable = t.Callable[..., t.Any] TemplateTestCallable = t.Callable[..., bool] URLDefaultCallable = t.Callable[[str, dict], None] URLValuePreprocessorCallable = t.Callable[[t.Optional[str], t.Optional[dict]], None] - - -if t.TYPE_CHECKING: - import typing_extensions as te - - class ErrorHandlerCallable(te.Protocol[GenericException]): - def __call__(self, error: GenericException) -> ResponseReturnValue: - ... +ErrorHandlerCallable = t.Callable[[GenericException], ResponseReturnValue]