Skip to content

Commit

Permalink
Fix warning: Condition will always evaluate to False since the types …
Browse files Browse the repository at this point in the history
…PredictionRequest and None have no overlap

Signed-off-by: Mattt Zmuda <mattt@replicate.com>
  • Loading branch information
mattt committed Apr 17, 2024
1 parent 0699c5c commit 338e7f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/cog/server/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ async def predict_idempotent(
return _predict(request=request, respond_async=respond_async)

def _predict(
*, request: PredictionRequest, respond_async: bool = False
*, request: Optional[PredictionRequest], respond_async: bool = False
) -> Response:
# [compat] If no body is supplied, assume that this model can be run
# with empty input. This will throw a ValidationError if that's not
Expand Down

0 comments on commit 338e7f8

Please sign in to comment.