← back to Exo
remove unused funcs
272b1e2a1ed9c52ff104c68ffd5a0246d0920a16 · 2024-12-05 21:55:40 +0000 · Alex Cheema
Files touched
M exo/topology/topology.py
Diff
commit 272b1e2a1ed9c52ff104c68ffd5a0246d0920a16
Author: Alex Cheema <alexcheema123@gmail.com>
Date: Thu Dec 5 21:55:40 2024 +0000
remove unused funcs
---
exo/topology/topology.py | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/exo/topology/topology.py b/exo/topology/topology.py
index 5549a9cb..b966f7f1 100644
--- a/exo/topology/topology.py
+++ b/exo/topology/topology.py
@@ -1,5 +1,5 @@
from .device_capabilities import DeviceCapabilities
-from typing import Dict, Set, Optional, NamedTuple
+from typing import Dict, Set, Optional
from dataclasses import dataclass
@dataclass
@@ -40,19 +40,6 @@ class Topology:
conn = PeerConnection(from_id, to_id, description)
self.peer_graph[from_id].add(conn)
- def get_neighbors(self, node_id: str) -> Set[str]:
- # Convert PeerConnection objects back to just destination IDs
- return {conn.to_id for conn in self.peer_graph.get(node_id, set())}
-
- def all_edges(self):
- edges = []
- for node_id, connections in self.peer_graph.items():
- for conn in connections:
- # Only include each edge once by checking if reverse already exists
- if not any(e[0] == conn.to_id and e[1] == conn.from_id for e in edges):
- edges.append((conn.from_id, conn.to_id, conn.description))
- return edges
-
def merge(self, other: "Topology"):
for node_id, capabilities in other.nodes.items():
self.update_node(node_id, capabilities)
← 68d70be9 always show desc1/desc2 in tui
·
back to Exo
·
previously was checking all nodes for download status which f8cc54b9 →