Skip to content

Commit 182afa0

Browse files
committed
Fixed ruff errors
1 parent f8e96cd commit 182afa0

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

instrumentation-genai/opentelemetry-instrumentation-langchain/src/opentelemetry/instrumentation/langchain/callback_handler.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@ def on_chat_model_start(
6767
if (model := kwargs.get(model_tag)) is not None:
6868
request_model = model
6969
break
70-
elif (
71-
model := (params or {}).get(model_tag)
72-
) is not None:
70+
elif (model := (params or {}).get(model_tag)) is not None:
7371
request_model = model
7472
break
7573
elif (model := (metadata or {}).get(model_tag)) is not None:

instrumentation-genai/opentelemetry-instrumentation-langchain/tests/test_llm_call.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,7 @@ def assert_openai_completion_attributes(
115115
def assert_bedrock_completion_attributes(
116116
span: ReadableSpan, response: Optional
117117
):
118-
assert (
119-
span.name
120-
== "chat us.amazon.nova-lite-v1:0"
121-
)
118+
assert span.name == "chat us.amazon.nova-lite-v1:0"
122119
assert span.attributes[gen_ai_attributes.GEN_AI_OPERATION_NAME] == "chat"
123120
assert (
124121
span.attributes[gen_ai_attributes.GEN_AI_REQUEST_MODEL]

0 commit comments

Comments
 (0)