Update request type on middleware types (#2754)

Co-authored-by: Adam Hopkins <adam@amhopkins.com>
This commit is contained in:
guacs 2023-07-08 23:35:24 -07:00 committed by GitHub
parent 049983cb70
commit c17230ef94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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]]