Fix type annotation for before_request and before_app_request decorators

This commit is contained in:
Marat Sharafutdinov 2021-05-25 18:04:41 +03:00 committed by Phil Jones
parent f7adb2c813
commit a960236117
4 changed files with 13 additions and 6 deletions

View file

@ -6,6 +6,7 @@ from .scaffold import _endpoint_from_view_func
from .scaffold import _sentinel
from .scaffold import Scaffold
from .typing import AfterRequestCallable
from .typing import BeforeFirstRequestCallable
from .typing import BeforeRequestCallable
from .typing import ErrorHandlerCallable
from .typing import TeardownCallable
@ -537,8 +538,8 @@ class Blueprint(Scaffold):
return f
def before_app_first_request(
self, f: BeforeRequestCallable
) -> BeforeRequestCallable:
self, f: BeforeFirstRequestCallable
) -> BeforeFirstRequestCallable:
"""Like :meth:`Flask.before_first_request`. Such a function is
executed before the first request to the application.
"""