mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-15 04:32:22 +00:00
Merge pull request #22328 from BerriAI/fix/ruff-plr0915-too-many-statements
fix(lint): suppress PLR0915 in complex transform methods
This commit is contained in:
+1
-1
@@ -64,7 +64,7 @@ class AnthropicResponsesStreamWrapper:
|
||||
self._current_block_index += 1
|
||||
return self._current_block_index
|
||||
|
||||
def _process_event(self, event: Any) -> None:
|
||||
def _process_event(self, event: Any) -> None: # noqa: PLR0915
|
||||
"""Convert one Responses API event into zero or more Anthropic chunks queued for emission."""
|
||||
event_type = getattr(event, "type", None)
|
||||
if event_type is None and isinstance(event, dict):
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ class LiteLLMAnthropicToResponsesAPIAdapter:
|
||||
return source.get("url")
|
||||
return None
|
||||
|
||||
def translate_messages_to_responses_input(
|
||||
def translate_messages_to_responses_input( # noqa: PLR0915
|
||||
self,
|
||||
messages: List[
|
||||
Union[
|
||||
|
||||
@@ -829,7 +829,7 @@ class GeminiRealtimeConfig(BaseRealtimeConfig):
|
||||
raise ValueError(f"Unknown openai event: {key}, value: {value}")
|
||||
return openai_event
|
||||
|
||||
def transform_realtime_response(
|
||||
def transform_realtime_response( # noqa: PLR0915
|
||||
self,
|
||||
message: Union[str, bytes],
|
||||
model: str,
|
||||
|
||||
Reference in New Issue
Block a user