diff --git a/src/daglib/operations.py b/src/daglib/operations.py index 0d642e5..bac9eb3 100644 --- a/src/daglib/operations.py +++ b/src/daglib/operations.py @@ -1,13 +1,12 @@ from __future__ import annotations from collections.abc import Iterable -from typing import TYPE_CHECKING, Any, TypeVar +from typing import TYPE_CHECKING, TypeVar from .util import ensure_set if TYPE_CHECKING: from .dag import DAG - from .typing import dictset T = TypeVar("T") @@ -32,12 +31,3 @@ def transitive_closure(graph: DAG[T], sub: T | Iterable[T], *, include_self: boo seen.update(sub) return seen - - -def slice_subgraph(graph: DAG, sub: Any) -> dictset: - closure = transitive_closure(graph, sub) - return {n: d & closure for n in closure if (d := set(graph[n]))} - - -def topological_sort(graph: DAG, *, reverse: bool = False) -> list: - return list(graph.keys())