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

@@ -20,68 +20,68 @@ sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from tools.analyze import AnalyzeTool
from tools.think_deeper import ThinkDeeperTool
from tools.review_code import ReviewCodeTool
from tools.debug_issue import DebugIssueTool
async def run_manual_live_tests():
"""Run live tests manually without pytest"""
print("🚀 Running manual live integration tests...")
# Check API key
if not os.environ.get("GEMINI_API_KEY"):
print("❌ GEMINI_API_KEY not found. Set it to run live tests.")
return False
try:
# Test google-genai import
from google import genai
from google.genai import types
print("✅ google-genai library import successful")
# Test tool integration
with tempfile.NamedTemporaryFile(mode='w', suffix='.py', delete=False) as f:
with tempfile.NamedTemporaryFile(mode="w", suffix=".py", delete=False) as f:
f.write("def hello(): return 'world'")
temp_path = f.name
try:
# Test AnalyzeTool
tool = AnalyzeTool()
result = await tool.execute({
"files": [temp_path],
"question": "What does this code do?",
"thinking_mode": "low"
})
result = await tool.execute(
{
"files": [temp_path],
"question": "What does this code do?",
"thinking_mode": "low",
}
)
if result and result[0].text:
print("✅ AnalyzeTool live test successful")
else:
print("❌ AnalyzeTool live test failed")
return False
# Test ThinkDeeperTool
# Test ThinkDeeperTool
think_tool = ThinkDeeperTool()
result = await think_tool.execute({
"current_analysis": "Testing live integration",
"thinking_mode": "minimal" # Fast test
})
result = await think_tool.execute(
{
"current_analysis": "Testing live integration",
"thinking_mode": "minimal", # Fast test
}
)
if result and result[0].text and "Extended Analysis" in result[0].text:
print("✅ ThinkDeeperTool live test successful")
else:
print("❌ ThinkDeeperTool live test failed")
return False
finally:
Path(temp_path).unlink(missing_ok=True)
print("\n🎉 All manual live tests passed!")
print("✅ google-genai library working correctly")
print("✅ All tools can make live API calls")
print("✅ All tools can make live API calls")
print("✅ Thinking modes functioning properly")
return True
except Exception as e:
print(f"❌ Live test failed: {e}")
return False
@@ -90,4 +90,4 @@ async def run_manual_live_tests():
if __name__ == "__main__":
# Run live tests when script is executed directly
success = asyncio.run(run_manual_live_tests())
exit(0 if success else 1)
exit(0 if success else 1)