refactor(tools): remove unused global file state compatibility

This commit is contained in:
chengyongru authored and chengyongru committed 2026-09-24 13:08:08 +08:00
1 parent ad52fa97c2
commit a4a733d965
4 files changed
-59

No files matched your search

-9
View File
@@ -12,17 +12,8 @@ import os
import pytest
from nanobot.agent.tools import file_state
from nanobot.agent.tools.filesystem import EditFileTool, ReadFileTool
@pytest.fixture(autouse=True)
def _clear_file_state():
file_state.clear()
yield
file_state.clear()
# ---------------------------------------------------------------------------
# Delete-line newline cleanup
# ---------------------------------------------------------------------------
-8
View File
@@ -13,14 +13,6 @@ from nanobot.agent.tools.filesystem import EditFileTool, ReadFileTool
# Helpers
# ---------------------------------------------------------------------------
@pytest.fixture(autouse=True)
def _clear_file_state():
"""Reset global read-state between tests."""
file_state.clear()
yield
file_state.clear()
# ---------------------------------------------------------------------------
# Read-independent editing
# ---------------------------------------------------------------------------
-7
View File
@@ -23,13 +23,6 @@ def _document_source(text: str) -> DocumentLineSource:
return DocumentLineSource(lines)
@pytest.fixture(autouse=True)
def _clear_file_state():
file_state.clear()
yield
file_state.clear()
# ---------------------------------------------------------------------------
# Description fix
# ---------------------------------------------------------------------------