From a0ae4abfc7b7ef84f7a0382ce7411e1dac78eae5 Mon Sep 17 00:00:00 2001 From: Pavel 'LEdoian' Turinsky Date: Mon, 10 Jul 2023 10:43:23 +0200 Subject: [PATCH] Fix a few mistakes thanks mypy --- birdvisu/topo_v3.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/birdvisu/topo_v3.py b/birdvisu/topo_v3.py index 32126ab..b33c782 100644 --- a/birdvisu/topo_v3.py +++ b/birdvisu/topo_v3.py @@ -89,14 +89,14 @@ class TopologyV3: # the Edge objects are not directly linked to Topology; to make the # connection, one needs to resolve one of the VertexIDs to the specific # Vertex to see if the edge is present. - self.vertices[source].outgoing_edges.add(edge) - self.vertices[target].incoming_edges.add(edge) + self.vertices[edge.source].outgoing_edges.add(edge) + self.vertices[edge.target].incoming_edges.add(edge) self.edges.add(edge) @classmethod def combine_topologies(cls, **topologies) -> 'TopologyV3': result = cls() - for label, topo in topologies: + for label, topo in topologies.items(): result.add_ancestor(label, topo) return result