Spaces:
Runtime error
Runtime error
phil71x
commited on
Commit
·
38a6bb3
1
Parent(s):
1a8fbbd
refactor: Simplify tool listing in sentiment analysis test function
Browse files- Updated the `test_mcp_sentiment_analysis` function to streamline the output of available tools by using a single print statement with a join operation.
- This change enhances readability and reduces the number of lines in the code while maintaining the same functionality.
- usage/sentiment_mcp.py +1 -2
usage/sentiment_mcp.py
CHANGED
@@ -67,8 +67,7 @@ def test_mcp_sentiment_analysis():
|
|
67 |
print("⏳ Getting available tools...")
|
68 |
tools = mcp_client.get_tools()
|
69 |
print(f"✅ Found {len(tools)} tools:")
|
70 |
-
for tool in tools
|
71 |
-
print(f" • {tool.name}: {tool.description}")
|
72 |
print()
|
73 |
|
74 |
# Test sentiment analysis with each text
|
|
|
67 |
print("⏳ Getting available tools...")
|
68 |
tools = mcp_client.get_tools()
|
69 |
print(f"✅ Found {len(tools)} tools:")
|
70 |
+
print("\n".join(f" • {tool.name}: {tool.description}" for tool in tools))
|
|
|
71 |
print()
|
72 |
|
73 |
# Test sentiment analysis with each text
|