From c039ea469805a5b7a0d12d5cfddc391f5d213ed9 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Tue, 5 May 2026 19:59:32 -0700 Subject: [PATCH] fix: remove unused imports and em dash in nodes.py scaffold - Drop unused StreamingResponse import from app/nodes.py (will be re-added in Task 2 when the SSE endpoint is implemented) - Replace em dash with colon in _get_ollama_url HTTPException detail - Remove unused os and unittest.mock imports from test_nodes.py (mock imports will return in Task 2 tests) --- app/nodes.py | 3 +-- tests/test_nodes.py | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/app/nodes.py b/app/nodes.py index a009bce..504081d 100644 --- a/app/nodes.py +++ b/app/nodes.py @@ -16,7 +16,6 @@ from urllib.parse import urlparse import yaml from fastapi import APIRouter, HTTPException -from fastapi.responses import StreamingResponse logger = logging.getLogger(__name__) @@ -98,7 +97,7 @@ def _get_ollama_url(node_id: str) -> str: return f"{parsed.scheme}://{parsed.hostname}:11434" raise HTTPException( status_code=404, - detail=f"Cannot determine Ollama URL for node {node_id} — no agent_url in profile", + detail=f"Cannot determine Ollama URL for node {node_id}: no agent_url in profile", ) diff --git a/tests/test_nodes.py b/tests/test_nodes.py index b55a146..2022307 100644 --- a/tests/test_nodes.py +++ b/tests/test_nodes.py @@ -1,9 +1,7 @@ """Tests for app/nodes.py — /api/nodes-mgmt/* endpoints.""" from __future__ import annotations -import os from pathlib import Path -from unittest.mock import MagicMock, patch import pytest import yaml