Skip to content

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

Open
@aurelg

Description

@aurelg

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions