Skip to content

Commit aae820e

Browse files
wip: fixing the precommit.
1 parent 871125f commit aae820e

1 file changed

Lines changed: 5 additions & 15 deletions

File tree

instrumentation-genai/opentelemetry-instrumentation-openai-v2/tests/test_choice_buffer.py

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,7 @@ def test_choicebuffer_append_tool_call_with_none_arguments():
8080
buf.append_tool_call(
8181
ChoiceDeltaToolCall(
8282
index=0,
83-
function=ChoiceDeltaToolCallFunction(
84-
arguments='{"city": "NYC"}'
85-
),
83+
function=ChoiceDeltaToolCallFunction(arguments='{"city": "NYC"}'),
8684
)
8785
)
8886

@@ -107,9 +105,7 @@ def test_choicebuffer_append_tool_call_normal_flow():
107105
buf.append_tool_call(
108106
ChoiceDeltaToolCall(
109107
index=0,
110-
function=ChoiceDeltaToolCallFunction(
111-
arguments='{"city": "NYC"}'
112-
),
108+
function=ChoiceDeltaToolCallFunction(arguments='{"city": "NYC"}'),
113109
)
114110
)
115111

@@ -135,9 +131,7 @@ def test_choicebuffer_append_multiple_tool_calls_with_none_arguments():
135131
buf.append_tool_call(
136132
ChoiceDeltaToolCall(
137133
index=0,
138-
function=ChoiceDeltaToolCallFunction(
139-
arguments='{"city": "NYC"}'
140-
),
134+
function=ChoiceDeltaToolCallFunction(arguments='{"city": "NYC"}'),
141135
)
142136
)
143137

@@ -155,15 +149,11 @@ def test_choicebuffer_append_multiple_tool_calls_with_none_arguments():
155149
buf.append_tool_call(
156150
ChoiceDeltaToolCall(
157151
index=1,
158-
function=ChoiceDeltaToolCallFunction(
159-
arguments='{"tz": "EST"}'
160-
),
152+
function=ChoiceDeltaToolCallFunction(arguments='{"tz": "EST"}'),
161153
)
162154
)
163155

164-
assert (
165-
"".join(buf.tool_calls_buffers[0].arguments) == '{"city": "NYC"}'
166-
)
156+
assert "".join(buf.tool_calls_buffers[0].arguments) == '{"city": "NYC"}'
167157
assert "".join(buf.tool_calls_buffers[1].arguments) == '{"tz": "EST"}'
168158

169159

0 commit comments

Comments
 (0)