mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
fix(guardrails): drop Final from a loop-assigned local
basedpyright rejects a Final assigned inside a loop, and reportGeneralTypeIssues sits one over its budget ceiling.
This commit is contained in:
parent
47421b7541
commit
f3eb108f86
1 changed files with 1 additions and 1 deletions
|
|
@ -99,7 +99,7 @@ def _collect_content(container: MutableRequest, slots: _SlotSink) -> None:
|
|||
def _collect_tool_arguments(message: MutableRequest, slots: _SlotSink) -> None:
|
||||
"""Tool arguments carry the values a user asked the model to act on."""
|
||||
for tool_call in message.get("tool_calls") or ():
|
||||
function: Final = tool_call.get("function") if isinstance(tool_call, dict) else None
|
||||
function = tool_call.get("function") if isinstance(tool_call, dict) else None # rebind-ok: loop variable.
|
||||
if isinstance(function, dict):
|
||||
_collect(function, "arguments", slots)
|
||||
legacy: Final = message.get("function_call")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue