refactor(file_graph): remove unused iter_nodes abstract method

BREAKING CHANGE: Removed the iter_nodes abstract method from BaseFileGraph
and its implementations in LocalFileGraph and Neo4jFileGraph as it was
no longer being used in the codebase.
This commit is contained in:
huangsen 2026-05-14 11:36:39 +08:00
parent 6a5561f86a
commit d9114469e3
3 changed files with 0 additions and 17 deletions

View file

@ -55,10 +55,6 @@ class BaseFileGraph(BaseComponent):
async def get_node(self, path: str) -> FileNode | None:
"""Single-node lookup."""
@abstractmethod
def iter_nodes(self) -> AsyncIterator[tuple[str, FileNode]]:
"""Walk every (path, FileNode) in the graph."""
# -- Link access -------------------------------------------------------
@abstractmethod

View file

@ -121,12 +121,6 @@ class LocalFileGraph(BaseFileGraph):
return None
return self._graph.nodes[path].get("node")
async def iter_nodes(self) -> AsyncIterator[tuple[str, FileNode]]:
for path, data in self._graph.nodes(data=True):
node = data.get("node")
if node is not None:
yield path, node
# -- Link access -------------------------------------------------------
async def get_outlinks(self, path: str) -> list[tuple[FileNode, FileLink]]:

View file

@ -208,13 +208,6 @@ class Neo4jFileGraph(BaseFileGraph):
row = await rec.single()
return self._row_to_node(row["f"]) if row else None
async def iter_nodes(self) -> AsyncIterator[tuple[str, FileNode]]:
async with self._session() as session:
rec = await session.run("MATCH (f:File) RETURN f")
async for row in rec:
node = self._row_to_node(row["f"])
yield node.path, node
# -- Link access -------------------------------------------------------
async def get_outlinks(self, path: str) -> list[tuple[FileNode, FileLink]]: