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:
airano
2026-02-23 23:27:27 +03:30
parent eceba04578
commit 55d30ba876
4 changed files with 6 additions and 11 deletions

View File

@@ -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):
""" """

View File

@@ -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)

View File

@@ -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 (

View File

@@ -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