style: fix ruff lint errors (unused imports, import sorting, SIM103)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -44,7 +44,6 @@ from starlette.templating import Jinja2Templates
|
||||
|
||||
# Import core modules
|
||||
from core import (
|
||||
EventType,
|
||||
LogLevel,
|
||||
ToolGenerator,
|
||||
get_api_key_manager,
|
||||
@@ -4258,10 +4257,7 @@ def create_multi_endpoint_app(transport: str = "streamable-http"):
|
||||
pass
|
||||
|
||||
# 4. Master API key (fallback — no distinguishing prefix)
|
||||
if auth_manager.validate_master_key(token):
|
||||
return True
|
||||
|
||||
return False
|
||||
return bool(auth_manager.validate_master_key(token))
|
||||
|
||||
class DashboardCSRFMiddleware(BaseHTTPMiddleware):
|
||||
"""
|
||||
|
||||
@@ -3,12 +3,11 @@ Integration tests for the per-user dynamic MCP endpoints.
|
||||
Uses Starlette TestClient to simulate real HTTP requests through the server.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
from starlette.testclient import TestClient
|
||||
from unittest.mock import patch, MagicMock, AsyncMock
|
||||
import json
|
||||
from unittest.mock import AsyncMock, MagicMock, patch
|
||||
|
||||
import pytest
|
||||
from server import create_multi_endpoint_app
|
||||
from starlette.testclient import TestClient
|
||||
|
||||
app = create_multi_endpoint_app()
|
||||
client = TestClient(app)
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
from unittest.mock import AsyncMock, MagicMock, patch
|
||||
|
||||
import aiohttp
|
||||
import pytest
|
||||
|
||||
from core.site_api import (
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
"""Tests for tenant isolation in Dashboard routes."""
|
||||
|
||||
import pytest
|
||||
|
||||
from core.dashboard.routes import get_all_projects
|
||||
from core.site_manager import SiteManager, SiteConfig
|
||||
from core.site_manager import SiteConfig, SiteManager
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
||||
Reference in New Issue
Block a user