Update request type on middleware types (#2754)
Co-authored-by: Adam Hopkins <adam@amhopkins.com>
This commit is contained in:
parent
049983cb70
commit
c17230ef94
|
@ -3,11 +3,12 @@ from typing import Any, Callable, Coroutine, Optional, TypeVar, Union
|
|||
|
||||
import sanic
|
||||
|
||||
from sanic.request import Request
|
||||
from sanic import request
|
||||
from sanic.response import BaseHTTPResponse, HTTPResponse
|
||||
|
||||
|
||||
Sanic = TypeVar("Sanic", bound="sanic.Sanic")
|
||||
Request = TypeVar("Request", bound="request.Request")
|
||||
|
||||
MiddlewareResponse = Union[
|
||||
Optional[HTTPResponse], Coroutine[Any, Any, Optional[HTTPResponse]]
|
||||
|
|
Loading…
Reference in New Issue
Block a user