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
|
# Import core modules
|
||||||
from core import (
|
from core import (
|
||||||
EventType,
|
|
||||||
LogLevel,
|
LogLevel,
|
||||||
ToolGenerator,
|
ToolGenerator,
|
||||||
get_api_key_manager,
|
get_api_key_manager,
|
||||||
@@ -4258,10 +4257,7 @@ def create_multi_endpoint_app(transport: str = "streamable-http"):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
# 4. Master API key (fallback — no distinguishing prefix)
|
# 4. Master API key (fallback — no distinguishing prefix)
|
||||||
if auth_manager.validate_master_key(token):
|
return bool(auth_manager.validate_master_key(token))
|
||||||
return True
|
|
||||||
|
|
||||||
return False
|
|
||||||
|
|
||||||
class DashboardCSRFMiddleware(BaseHTTPMiddleware):
|
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.
|
Uses Starlette TestClient to simulate real HTTP requests through the server.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import pytest
|
from unittest.mock import AsyncMock, MagicMock, patch
|
||||||
from starlette.testclient import TestClient
|
|
||||||
from unittest.mock import patch, MagicMock, AsyncMock
|
|
||||||
import json
|
|
||||||
|
|
||||||
|
import pytest
|
||||||
from server import create_multi_endpoint_app
|
from server import create_multi_endpoint_app
|
||||||
|
from starlette.testclient import TestClient
|
||||||
|
|
||||||
app = create_multi_endpoint_app()
|
app = create_multi_endpoint_app()
|
||||||
client = TestClient(app)
|
client = TestClient(app)
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
from unittest.mock import AsyncMock, MagicMock, patch
|
from unittest.mock import AsyncMock, MagicMock, patch
|
||||||
|
|
||||||
import aiohttp
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from core.site_api import (
|
from core.site_api import (
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
"""Tests for tenant isolation in Dashboard routes."""
|
"""Tests for tenant isolation in Dashboard routes."""
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from core.dashboard.routes import get_all_projects
|
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
|
@pytest.mark.asyncio
|
||||||
|
|||||||
Reference in New Issue
Block a user