[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-06-20 07:15:26 +00:00
commit 4b68cac412
2 changed files with 4 additions and 2 deletions

View file

@ -100,7 +100,7 @@ class TestParser:
assert json.loads(result[0]["function"]["arguments"]) == {"command": "echo {foo:bar}"}
def test_gemma_native_tool_call_bare_string_values(self):
text = '<|tool_call>call:get_weather{location:Tokyo,unit:celsius}<tool_call|>'
text = "<|tool_call>call:get_weather{location:Tokyo,unit:celsius}<tool_call|>"
result = parse_tool_calls_from_text(text)
assert len(result) == 1
assert json.loads(result[0]["function"]["arguments"]) == {

View file

@ -141,7 +141,9 @@ class TestGemmaNativeStyle:
def test_bare_unquoted_string_values_are_accepted(self):
# Gemma can emit enum/string args unquoted; bare JSON scalars stay typed.
text = '<|tool_call>call:get_weather{location:Tokyo,unit:celsius,days:3,live:true}<tool_call|>'
text = (
"<|tool_call>call:get_weather{location:Tokyo,unit:celsius,days:3,live:true}<tool_call|>"
)
calls = parse_tool_calls_from_text(text, allow_incomplete = False)
assert len(calls) == 1
assert json.loads(calls[0]["function"]["arguments"]) == {