Skip to content

Commit ee97d83

Browse files
style: fix import sorting and formatting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6872b24 commit ee97d83

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

tests/agent/tools/test_datafabric_query_tool.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
_normalize_sql,
88
_validate_sql,
99
)
10-
from uipath_langchain.agent.tools.datafabric_tool.models import DataFabricExecuteSqlInput
10+
from uipath_langchain.agent.tools.datafabric_tool.models import (
11+
DataFabricExecuteSqlInput,
12+
)
1113

1214

1315
def test_normalize_sql_strips_single_trailing_semicolon():
@@ -17,8 +19,7 @@ def test_normalize_sql_strips_single_trailing_semicolon():
1719

1820
def test_validate_sql_rejects_multiple_statements():
1921
assert (
20-
_validate_sql("SELECT 1; SELECT 2")
21-
== "Multiple SQL statements are not allowed"
22+
_validate_sql("SELECT 1; SELECT 2") == "Multiple SQL statements are not allowed"
2223
)
2324

2425

tests/agent/tools/test_datafabric_tool.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ async def test_datafabric_handler_returns_single_terminal_tool_message():
2525
handler._compiled = _FakeCompiledGraph( # type: ignore[assignment]
2626
{
2727
"messages": [
28-
ToolMessage(content="{'records': [1], 'total_count': 1}", tool_call_id="1")
28+
ToolMessage(
29+
content="{'records': [1], 'total_count': 1}", tool_call_id="1"
30+
)
2931
]
3032
}
3133
)
@@ -61,7 +63,10 @@ async def test_datafabric_handler_aggregates_multiple_terminal_tool_messages():
6163
assert "Multiple SQL queries executed successfully." in result
6264
assert "Result 1:" in result
6365
assert "Result 2:" in result
64-
assert "{'records': [{'id': 1}], 'total_count': 1, 'sql_query': 'SELECT ...'}" in result
66+
assert (
67+
"{'records': [{'id': 1}], 'total_count': 1, 'sql_query': 'SELECT ...'}"
68+
in result
69+
)
6570
assert (
6671
"{'records': [{'name': 'Acme'}], 'total_count': 1, 'sql_query': 'SELECT ...'}"
6772
in result
@@ -77,7 +82,9 @@ async def test_datafabric_handler_prefers_terminal_ai_message():
7782
handler._compiled = _FakeCompiledGraph( # type: ignore[assignment]
7883
{
7984
"messages": [
80-
ToolMessage(content="{'records': [], 'total_count': 0}", tool_call_id="1"),
85+
ToolMessage(
86+
content="{'records': [], 'total_count': 0}", tool_call_id="1"
87+
),
8188
AIMessage(content="I could not find any matching rows."),
8289
]
8390
}

0 commit comments

Comments
 (0)