Skip to content
Myr

Merge pull request #4298 from delicb/fix/issue4295

Before adoption: this commit came in with the history the project adopted, so no landing records it.

fix errorhandler type check

authored by David Lord · committed by GitHub · parents 3720669, 46b39e2 · Browse files · 2 files+2 added−8 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+2 added−8 removed

  • other:+2 added−8 removed

2 files+2 added−8 removed

modified:src/flask/typing.py+1 added-8 removed
44 unmodified lines
45TemplateGlobalCallable = t.Callable[..., t.Any]46TemplateTestCallable = t.Callable[..., bool]47URLDefaultCallable = t.Callable[[str, dict], None]48URLValuePreprocessorCallable = t.Callable[[t.Optional[str], t.Optional[dict]], None]495051if t.TYPE_CHECKING:52 import typing_extensions as te5354 class ErrorHandlerCallable(te.Protocol[GenericException]):55 def __call__(self, error: GenericException) -> ResponseReturnValue:56 ...49ErrorHandlerCallable = t.Callable[[GenericException], ResponseReturnValue]
modified:CHANGES.rst+1 added
7 unmodified lines
8- The test client's ``as_tuple`` parameter is deprecated and will be9 removed in Werkzeug 2.1. It is now also deprecated in Flask, to be10 removed in Flask 2.1, while remaining compatible with both in11 2.0.x. Use ``response.request.environ`` instead. :pr:`4341`12- Fix type annotation for ``errorhandler`` decorator. :issue:`4295`131415Version 2.0.216-------------
1180 unmodified lines