From 6a08fee42d3eafe317b543034ce4d2a41f8c261d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 29 Jul 2026 09:18:45 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- studio/backend/core/inference/chat_template_helpers.py | 4 +--- studio/backend/tests/test_control_markup_neutralize_7066.py | 6 +++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/studio/backend/core/inference/chat_template_helpers.py b/studio/backend/core/inference/chat_template_helpers.py index f0070e4933..a77679bfc5 100644 --- a/studio/backend/core/inference/chat_template_helpers.py +++ b/studio/backend/core/inference/chat_template_helpers.py @@ -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: diff --git a/studio/backend/tests/test_control_markup_neutralize_7066.py b/studio/backend/tests/test_control_markup_neutralize_7066.py index c51af3131d..5fcb7c22b1 100644 --- a/studio/backend/tests/test_control_markup_neutralize_7066.py +++ b/studio/backend/tests/test_control_markup_neutralize_7066.py @@ -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