fix typing that wasn't available in Python 3.6.0

This commit is contained in:
David Lord 2021-05-13 12:53:32 -07:00
parent 6fe7f45725
commit 25884c433f
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
4 changed files with 7 additions and 3 deletions

View file

@ -72,6 +72,7 @@ from .wrappers import Request
from .wrappers import Response
if t.TYPE_CHECKING:
import typing_extensions as te
from .blueprints import Blueprint
from .testing import FlaskClient
from .testing import FlaskCliRunner
@ -1441,7 +1442,7 @@ class Flask(Scaffold):
f"Exception on {request.path} [{request.method}]", exc_info=exc_info
)
def raise_routing_exception(self, request: Request) -> t.NoReturn:
def raise_routing_exception(self, request: Request) -> "te.NoReturn":
"""Exceptions that are recording during routing are reraised with
this method. During debug we are not reraising redirect requests
for non ``GET``, ``HEAD``, or ``OPTIONS`` requests and we're raising