[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2026-07-29 09:18:45 +00:00
commit 6a08fee42d
2 changed files with 6 additions and 4 deletions

View file

@ -115,9 +115,7 @@ def _neutralize_tool_call_arguments(tool_calls: list) -> list:
for call in tool_calls:
function = call.get("function") if isinstance(call, dict) else None
arguments = function.get("arguments") if isinstance(function, dict) else None
new_arguments = (
arguments if arguments is None else _neutralize_argument_leaves(arguments)
)
new_arguments = arguments if arguments is None else _neutralize_argument_leaves(arguments)
if new_arguments is arguments or new_arguments == arguments:
out.append(call)
else:

View file

@ -188,7 +188,11 @@ class _JinjaTokenizer:
# Templates that take "tools" are rendered by passing supports = ("tools",);
# by default the kwarg is dropped, standing in for a tokenizer that has no
# tool support.
def __init__(self, template: str, supports: tuple = ()):
def __init__(
self,
template: str,
supports: tuple = (),
):
self._template = template
self._supports = supports