Skip to content

Commit

Permalink
fix circular import
Browse files Browse the repository at this point in the history
  • Loading branch information
devxpy committed Feb 18, 2024
1 parent 1f837d0 commit f82d5f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions daras_ai_v2/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
from loguru import logger
from requests import HTTPError

from daras_ai.image_input import truncate_filename


def raise_for_status(resp: requests.Response):
"""Raises :class:`HTTPError`, if one occurred."""
Expand Down Expand Up @@ -35,6 +33,8 @@ def raise_for_status(resp: requests.Response):


def _response_preview(resp: requests.Response) -> bytes:
from daras_ai.image_input import truncate_filename

return truncate_filename(resp.content, 500, sep=b"...")


Expand Down

0 comments on commit f82d5f4

Please sign in to comment.