Skip to content

Commit 5a0e853

Browse files
committed
cleanup
1 parent 056fc7c commit 5a0e853

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

sentry_sdk/integrations/pydantic_ai/spans/execute_tool.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,7 @@ def execute_tool_span(
3838
span.set_data(SPANDATA.GEN_AI_TOOL_TYPE, tool_type)
3939
span.set_data(SPANDATA.GEN_AI_TOOL_NAME, tool_name)
4040

41-
if (
42-
tool_definition is not None
43-
and getattr(tool_definition, "description", None) is not None
44-
):
41+
if tool_definition is not None and hasattr(tool_definition, "description"):
4542
span.set_data(
4643
SPANDATA.GEN_AI_TOOL_DESCRIPTION,
4744
tool_definition.description,

0 commit comments

Comments
 (0)