fix the lint error in backend

This commit is contained in:
Willem Jiang
2026-04-26 15:09:25 +08:00
parent 3b71e2d377
commit 829e82a9af
15 changed files with 76 additions and 49 deletions
@@ -1,8 +1,10 @@
"""Tests for per-user memory storage isolation."""
import pytest
from pathlib import Path
from unittest.mock import patch
import pytest
from deerflow.agents.memory.storage import FileMemoryStorage, create_empty_memory
@@ -65,8 +67,8 @@ class TestUserIsolatedStorage:
assert loaded_a["user"]["workContext"]["summary"] == "A"
def test_no_user_id_uses_legacy_path(self, base_dir: Path):
from deerflow.config.paths import Paths
from deerflow.config.memory_config import MemoryConfig
from deerflow.config.paths import Paths
paths = Paths(base_dir)
with patch("deerflow.agents.memory.storage.get_paths", return_value=paths):
@@ -79,8 +81,8 @@ class TestUserIsolatedStorage:
def test_user_and_legacy_do_not_interfere(self, base_dir: Path):
"""user_id=None (legacy) and user_id='alice' must use different files and caches."""
from deerflow.config.paths import Paths
from deerflow.config.memory_config import MemoryConfig
from deerflow.config.paths import Paths
paths = Paths(base_dir)
with patch("deerflow.agents.memory.storage.get_paths", return_value=paths):