Fix a few mistakes

thanks mypy
styling
LEdoian 1 year ago
parent d17c8c4585
commit a0ae4abfc7

@ -89,14 +89,14 @@ class TopologyV3:
# the Edge objects are not directly linked to Topology; to make the # the Edge objects are not directly linked to Topology; to make the
# connection, one needs to resolve one of the VertexIDs to the specific # connection, one needs to resolve one of the VertexIDs to the specific
# Vertex to see if the edge is present. # Vertex to see if the edge is present.
self.vertices[source].outgoing_edges.add(edge) self.vertices[edge.source].outgoing_edges.add(edge)
self.vertices[target].incoming_edges.add(edge) self.vertices[edge.target].incoming_edges.add(edge)
self.edges.add(edge) self.edges.add(edge)
@classmethod @classmethod
def combine_topologies(cls, **topologies) -> 'TopologyV3': def combine_topologies(cls, **topologies) -> 'TopologyV3':
result = cls() result = cls()
for label, topo in topologies: for label, topo in topologies.items():
result.add_ancestor(label, topo) result.add_ancestor(label, topo)
return result return result

Loading…
Cancel
Save