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)
This commit is contained in:
parent
95afddb772
commit
c039ea4698
2 changed files with 1 additions and 4 deletions
|
|
@ -16,7 +16,6 @@ from urllib.parse import urlparse
|
||||||
|
|
||||||
import yaml
|
import yaml
|
||||||
from fastapi import APIRouter, HTTPException
|
from fastapi import APIRouter, HTTPException
|
||||||
from fastapi.responses import StreamingResponse
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
@ -98,7 +97,7 @@ def _get_ollama_url(node_id: str) -> str:
|
||||||
return f"{parsed.scheme}://{parsed.hostname}:11434"
|
return f"{parsed.scheme}://{parsed.hostname}:11434"
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=404,
|
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",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
"""Tests for app/nodes.py — /api/nodes-mgmt/* endpoints."""
|
"""Tests for app/nodes.py — /api/nodes-mgmt/* endpoints."""
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import os
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from unittest.mock import MagicMock, patch
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import yaml
|
import yaml
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue