forked from orbit-oss/flask
Merge pull request #4298 from delicb/fix/issue4295
fix errorhandler type check
This commit is contained in:
commit
b831e8507c
2 changed files with 2 additions and 8 deletions
|
|
@ -9,6 +9,7 @@ Unreleased
|
||||||
removed in Werkzeug 2.1. It is now also deprecated in Flask, to be
|
removed in Werkzeug 2.1. It is now also deprecated in Flask, to be
|
||||||
removed in Flask 2.1, while remaining compatible with both in
|
removed in Flask 2.1, while remaining compatible with both in
|
||||||
2.0.x. Use ``response.request.environ`` instead. :pr:`4341`
|
2.0.x. Use ``response.request.environ`` instead. :pr:`4341`
|
||||||
|
- Fix type annotation for ``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