Skip to content

Commit

Permalink
fix: correct incorrect type annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
judahrand committed Aug 18, 2023
1 parent 370c324 commit cc85ea2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/bentoml/_internal/ray/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from functools import partial

from ray.serve._private.http_util import ASGIHTTPSender
from starlette.requests import Request

import bentoml
from bentoml import Tag
Expand All @@ -22,9 +23,6 @@
"""'ray[serve]' is required in order to use module 'bentoml.ray', install with 'pip install -U "ray[serve]"'. See https://docs.ray.io/ for more information.""",
)

if t.TYPE_CHECKING:
import requests


def _get_runner_deployment(
svc: bentoml.Service,
Expand Down Expand Up @@ -95,7 +93,7 @@ def __init__(self, **runner_deployments: dict[str, Deployment]):
assert runner.name in runner_deployments
runner._set_handle(RayRunnerHandle, runner_deployments[runner.name])

async def __call__(self, request: requests.Request):
async def __call__(self, request: Request):
sender = ASGIHTTPSender()
await self.app(request.scope, receive=request.receive, send=sender)
return sender.build_asgi_response()
Expand Down

0 comments on commit cc85ea2

Please sign in to comment.