mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-14 09:03:16 +00:00
fix(anthropic): annotate the error-chunk builder for the type-discipline gate
_make_error_chunk returns a dict because the chunk is appended to _chunk_queue and returned from __anext__, both of which are typed dict[str, Any] by the existing iterator contract in this file. Record that with a mutable-ok reason so the LIT001 budget stays flat.
This commit is contained in:
parent
a3b139e086
commit
d711cfbc84
1 changed files with 3 additions and 1 deletions
|
|
@ -124,7 +124,9 @@ class AnthropicResponsesStreamWrapper:
|
|||
self._current_block_index += 1
|
||||
return self._current_block_index
|
||||
|
||||
def _make_error_chunk(self, message: str) -> dict[str, Any]:
|
||||
def _make_error_chunk(
|
||||
self, message: str
|
||||
) -> dict[str, Any]: # mutable-ok: queued into _chunk_queue and returned from __anext__, both typed dict[str, Any]
|
||||
return {
|
||||
"type": "error",
|
||||
"error": {"type": "api_error", "message": message},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue