Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different order for edges between different calls when several source files are provided #77

Open
aurelg opened this issue Sep 19, 2021 · 0 comments · May be fixed by #78
Open

Different order for edges between different calls when several source files are provided #77

aurelg opened this issue Sep 19, 2021 · 0 comments · May be fixed by #78

Comments

@aurelg
Copy link

aurelg commented Sep 19, 2021

Thanks for this wonderful tool!

I noticed the order of edges in the output dot file is not reproducible between different calls when several source files are provided.

A quick fix would be to update writer.py:58 so that instead of:

for edge in self.graph.edges:

We had:

for edge in sorted(self.graph.edges, key=lambda x: (x.source.id, x.target.id)):

That would let us use pyan in a git precommit hook, as it would not introduce spurious and unnecessary changes in the git diff.

I can make the PR, just let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant