Fix comparison logic in Graph class

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-02-18 20:30:05 -03:00
commit 455a518352

View file

@ -85,6 +85,9 @@ class Graph:
if different_vertices is None:
different_vertices = []
for vertex in self.vertices:
other_vertex = other.get_vertex(vertex.id)
if other_vertex is None:
continue
if (
vertex.id in different_vertices
or vertex.__repr__() != other.get_vertex(vertex.id).__repr__()