Skip to content

Commit 21b21d7

Browse files
jquinterclaude
andcommitted
fix(lint): suppress PLR0915 too-many-statements in complex transform methods
These three methods legitimately need many statements for their event/message transformation logic. Suppress the lint warning rather than artificially splitting the methods. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent af6fe18 commit 21b21d7

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

litellm/llms/anthropic/experimental_pass_through/responses_adapters/streaming_iterator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def _next_block_index(self) -> int:
6464
self._current_block_index += 1
6565
return self._current_block_index
6666

67-
def _process_event(self, event: Any) -> None:
67+
def _process_event(self, event: Any) -> None: # noqa: PLR0915
6868
"""Convert one Responses API event into zero or more Anthropic chunks queued for emission."""
6969
event_type = getattr(event, "type", None)
7070
if event_type is None and isinstance(event, dict):

litellm/llms/anthropic/experimental_pass_through/responses_adapters/transformation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def _translate_anthropic_image_source_to_url(source: dict) -> Optional[str]:
4848
return source.get("url")
4949
return None
5050

51-
def translate_messages_to_responses_input(
51+
def translate_messages_to_responses_input( # noqa: PLR0915
5252
self,
5353
messages: List[
5454
Union[

litellm/llms/gemini/realtime/transformation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ def map_openai_event(
829829
raise ValueError(f"Unknown openai event: {key}, value: {value}")
830830
return openai_event
831831

832-
def transform_realtime_response(
832+
def transform_realtime_response( # noqa: PLR0915
833833
self,
834834
message: Union[str, bytes],
835835
model: str,

0 commit comments

Comments
 (0)