diff --git a/CHANGES.rst b/CHANGES.rst index 006c0a1f..9c374f56 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,8 @@ Version 2.0.2 Unreleased +- Fix type annotation for ``teardown_request``. :issue:`4093` + Version 2.0.1 ------------- diff --git a/src/flask/typing.py b/src/flask/typing.py index 5f27308c..60c725ee 100644 --- a/src/flask/typing.py +++ b/src/flask/typing.py @@ -37,7 +37,7 @@ AppOrBlueprintKey = t.Optional[str] # The App key is None, whereas blueprints a AfterRequestCallable = t.Callable[["Response"], "Response"] BeforeRequestCallable = t.Callable[[], None] ErrorHandlerCallable = t.Callable[[Exception], ResponseReturnValue] -TeardownCallable = t.Callable[[t.Optional[BaseException]], "Response"] +TeardownCallable = t.Callable[[t.Optional[BaseException]], None] TemplateContextProcessorCallable = t.Callable[[], t.Dict[str, t.Any]] TemplateFilterCallable = t.Callable[[t.Any], str] TemplateGlobalCallable = t.Callable[[], t.Any]