From 315ba0e61392645f4f793f880e40db8a38e79eb5 Mon Sep 17 00:00:00 2001 From: fzowl Date: Tue, 30 Jun 2026 02:28:13 +0200 Subject: [PATCH] style(voyage): format multimodal embedding transformation to satisfy ruff The copy of transformation_multimodal.py on the base branch carries a few lines that exceed the 88 char limit (the httpx.Request construction, a comprehension and two error constructions). Wrap them so ruff format --check passes on the merged result --- .../embedding/transformation_multimodal.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/litellm/llms/voyage/embedding/transformation_multimodal.py b/litellm/llms/voyage/embedding/transformation_multimodal.py index 58e197ce68c..16410409408 100644 --- a/litellm/llms/voyage/embedding/transformation_multimodal.py +++ b/litellm/llms/voyage/embedding/transformation_multimodal.py @@ -27,7 +27,9 @@ class VoyageMultimodalEmbeddingError(BaseLLMException): ): self.status_code = status_code self.message = message - self.request = httpx.Request(method="POST", url="https://api.voyageai.com/v1/multimodalembeddings") + self.request = httpx.Request( + method="POST", url="https://api.voyageai.com/v1/multimodalembeddings" + ) self.response = httpx.Response(status_code=status_code, request=self.request) super().__init__( status_code=status_code, @@ -133,7 +135,10 @@ class VoyageMultimodalEmbeddingConfig(BaseEmbeddingConfig): content = item.get("content") or [] return { **item, - "content": [self._normalize_content_item(content_item) for content_item in content], + "content": [ + self._normalize_content_item(content_item) + for content_item in content + ], } return item @@ -165,7 +170,9 @@ class VoyageMultimodalEmbeddingConfig(BaseEmbeddingConfig): try: raw_response_json = raw_response.json() except Exception: - raise VoyageMultimodalEmbeddingError(message=raw_response.text, status_code=raw_response.status_code) + raise VoyageMultimodalEmbeddingError( + message=raw_response.text, status_code=raw_response.status_code + ) model_response.model = raw_response_json.get("model") model_response.data = raw_response_json.get("data") @@ -182,4 +189,6 @@ class VoyageMultimodalEmbeddingConfig(BaseEmbeddingConfig): def get_error_class( self, error_message: str, status_code: int, headers: Union[dict, httpx.Headers] ) -> BaseLLMException: - return VoyageMultimodalEmbeddingError(message=error_message, status_code=status_code, headers=headers) + return VoyageMultimodalEmbeddingError( + message=error_message, status_code=status_code, headers=headers + )