Skip to content

Commit

Permalink
Make edge order reproducible between calls, see Technologicat#77
Browse files Browse the repository at this point in the history
  • Loading branch information
aurelg committed Sep 19, 2021
1 parent 350ea49 commit 5283e48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyan/writers.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def write_subgraph(self, graph):

def write_edges(self):
self.start_edges()
for edge in self.graph.edges:
for edge in sorted(self.graph.edges, key=lambda x: (x.source.id, x.target.id)):
self.write_edge(edge)
self.finish_edges()

Expand Down

0 comments on commit 5283e48

Please sign in to comment.