From 05b782078c4dda40286ce744e3bc5a838a2b8b93 Mon Sep 17 00:00:00 2001 From: Min RK Date: Mon, 21 Oct 2013 22:27:51 +0000 Subject: [PATCH] sort class items in inheritance_diagram avoids hash changing every time a diagram is regenerated due to random dict ordering --- sphinx/ext/inheritance_diagram.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinx/ext/inheritance_diagram.py b/sphinx/ext/inheritance_diagram.py index b4f5f4307..2d1d6e30c 100644 --- a/sphinx/ext/inheritance_diagram.py +++ b/sphinx/ext/inheritance_diagram.py @@ -241,7 +241,7 @@ class InheritanceGraph(object): res.append('digraph %s {\n' % name) res.append(self._format_graph_attrs(g_attrs)) - for cls, (name, fullname, bases) in self.class_info.items(): + for cls, (name, fullname, bases) in sorted(self.class_info.items()): # Write the node this_node_attrs = n_attrs.copy() if fullname in urls: