style: fix linting and formatting issues

- Run black formatter on all Python files
- Fix ruff linting issues:
  - Remove unused imports
  - Remove unused variables
  - Fix f-string without placeholders
- All 37 tests still pass
- Code quality improved for CI/CD compliance

🧹 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Fahad
2025-06-09 09:37:46 +04:00
parent fb5c04ea60
commit 5ccedcecd8
14 changed files with 376 additions and 256 deletions

View File

@@ -33,9 +33,7 @@ class TestServerTools:
# Check descriptions are verbose
for tool in tools:
assert (
len(tool.description) > 50
) # All should have detailed descriptions
assert len(tool.description) > 50 # All should have detailed descriptions
@pytest.mark.asyncio
async def test_handle_call_tool_unknown(self):
@@ -49,8 +47,9 @@ class TestServerTools:
"""Test chat functionality"""
# Set test environment
import os
os.environ["PYTEST_CURRENT_TEST"] = "test"
# Create a mock for the model
with patch("tools.base.BaseTool.create_model") as mock_create:
mock_model = Mock()
@@ -58,9 +57,9 @@ class TestServerTools:
candidates=[Mock(content=Mock(parts=[Mock(text="Chat response")]))]
)
mock_create.return_value = mock_model
result = await handle_call_tool("chat", {"prompt": "Hello Gemini"})
assert len(result) == 1
assert result[0].text == "Chat response"
@@ -69,7 +68,7 @@ class TestServerTools:
"""Test listing models"""
result = await handle_call_tool("list_models", {})
assert len(result) == 1
# Check if we got models or an error
text = result[0].text
if "Error" in text: