fix typing that wasn't available in Python 3.6.0
This commit is contained in:
parent
6fe7f45725
commit
25884c433f
4 changed files with 7 additions and 3 deletions
|
|
@ -8,6 +8,7 @@ from . import json
|
|||
from .globals import current_app
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
import typing_extensions as te
|
||||
from werkzeug.routing import Rule
|
||||
|
||||
|
||||
|
|
@ -91,7 +92,7 @@ class Request(RequestBase):
|
|||
|
||||
attach_enctype_error_multidict(self)
|
||||
|
||||
def on_json_loading_failed(self, e: Exception) -> t.NoReturn:
|
||||
def on_json_loading_failed(self, e: Exception) -> "te.NoReturn":
|
||||
if current_app and current_app.debug:
|
||||
raise BadRequest(f"Failed to decode JSON object: {e}")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue