From 1a889ffa380f8f8a1ca49a837ca3904dc68e0ca7 Mon Sep 17 00:00:00 2001 From: Mateo Wang <277851410+mateo-berri@users.noreply.github.com> Date: Wed, 24 Jun 2026 08:16:00 -0700 Subject: [PATCH] style(anthropic): black format transformation.py --- .../experimental_pass_through/adapters/transformation.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/litellm/llms/anthropic/experimental_pass_through/adapters/transformation.py b/litellm/llms/anthropic/experimental_pass_through/adapters/transformation.py index 3912df8fd6e..bba0977b339 100644 --- a/litellm/llms/anthropic/experimental_pass_through/adapters/transformation.py +++ b/litellm/llms/anthropic/experimental_pass_through/adapters/transformation.py @@ -1482,10 +1482,7 @@ class LiteLLMAnthropicMessagesAdapter: ) -> Union[ContentBlockDelta, MessageBlockDelta]: if getattr(response, "usage", None) is not None: litellm_usage_chunk: Optional[Usage] = response.usage # type: ignore - elif ( - hasattr(response, "_hidden_params") - and "usage" in response._hidden_params - ): + elif hasattr(response, "_hidden_params") and "usage" in response._hidden_params: litellm_usage_chunk = response._hidden_params["usage"] else: litellm_usage_chunk = None @@ -1495,9 +1492,7 @@ class LiteLLMAnthropicMessagesAdapter: has_finish_reason = ( bool(response.choices) and response.choices[0].finish_reason is not None ) - has_usage_only_chunk = ( - not response.choices and litellm_usage_chunk is not None - ) + has_usage_only_chunk = not response.choices and litellm_usage_chunk is not None if has_finish_reason or has_usage_only_chunk: stop_reason = ( self._translate_openai_finish_reason_to_anthropic(