Merge pull request #4680 from pgjones/typing-test

Add further typing tests
This commit is contained in:
David Lord 2022-07-08 06:41:56 -07:00 committed by GitHub
commit c757882808
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,38 @@
from __future__ import annotations
import typing as t
from flask import Flask
from flask import Response
app = Flask(__name__)
@app.after_request
def after_sync(response: Response) -> Response:
...
@app.after_request
async def after_async(response: Response) -> Response:
...
@app.before_request
def before_sync() -> None:
...
@app.before_request
async def before_async() -> None:
...
@app.teardown_appcontext
def teardown_sync(exc: t.Optional[BaseException]) -> None:
...
@app.teardown_appcontext
async def teardown_async(exc: t.Optional[BaseException]) -> None:
...