Sort attributes in inheritance diagrams.

This ensures that the graphviz script is always the same and thus the
filename (which is the hash of the script and other things) remains
consistent.
This commit is contained in:
Elliott Sales de Andrade 2016-01-01 04:55:33 -05:00 committed by Georg Brandl
parent e03dc8d27e
commit c100089334

View File

@ -227,10 +227,10 @@ class InheritanceGraph(object):
}
def _format_node_attrs(self, attrs):
return ','.join(['%s=%s' % x for x in attrs.items()])
return ','.join(['%s=%s' % x for x in sorted(attrs.items())])
def _format_graph_attrs(self, attrs):
return ''.join(['%s=%s;\n' % x for x in attrs.items()])
return ''.join(['%s=%s;\n' % x for x in sorted(attrs.items())])
def generate_dot(self, name, urls={}, env=None,
graph_attrs={}, node_attrs={}, edge_attrs={}):