Skip to content

Commit ec5517d

Browse files
wip: fixing lint and precommit.
1 parent 2e2867c commit ec5517d

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

instrumentation-genai/opentelemetry-instrumentation-openai-v2/src/opentelemetry/instrumentation/openai_v2/patch.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -611,9 +611,7 @@ def append_tool_call(self, tool_call):
611611
)
612612

613613
if function:
614-
self.tool_calls_buffers[idx].append_arguments(
615-
function.arguments
616-
)
614+
self.tool_calls_buffers[idx].append_arguments(function.arguments)
617615

618616

619617
class BaseStreamWrapper:

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
)
2626

2727

28-
class TestToolCallBuffer:
28+
class TestToolCallBuffer: # pylint: disable=no-self-use
2929
def test_append_arguments_with_string(self):
3030
buf = ToolCallBuffer(0, "call_1", "get_weather")
3131
buf.append_arguments('{"city":')
@@ -58,7 +58,7 @@ def test_append_arguments_empty_string(self):
5858
assert "".join(buf.arguments) == '{"city": "NYC"}'
5959

6060

61-
class TestChoiceBuffer:
61+
class TestChoiceBuffer: # pylint: disable=no-self-use
6262
def test_append_tool_call_with_none_arguments(self):
6363
"""End-to-end regression test for issue #4344.
6464
@@ -158,7 +158,9 @@ def test_append_multiple_tool_calls_with_none_arguments(self):
158158
)
159159
)
160160

161-
assert "".join(buf.tool_calls_buffers[0].arguments) == '{"city": "NYC"}'
161+
assert (
162+
"".join(buf.tool_calls_buffers[0].arguments) == '{"city": "NYC"}'
163+
)
162164
assert "".join(buf.tool_calls_buffers[1].arguments) == '{"tz": "EST"}'
163165

164166
def test_append_tool_call_with_none_function(self):

0 commit comments

Comments
 (0)