From d8aa31fd680c5f3b574c33eb5ddc8e2d3845f9b5 Mon Sep 17 00:00:00 2001 From: Josselin Date: Tue, 12 Jan 2021 10:58:08 +0100 Subject: [PATCH 1/2] Fix inheritance graph output (issue introduced with #729) --- slither/printers/inheritance/inheritance_graph.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/slither/printers/inheritance/inheritance_graph.py b/slither/printers/inheritance/inheritance_graph.py index 8575407d4..396680bb6 100644 --- a/slither/printers/inheritance/inheritance_graph.py +++ b/slither/printers/inheritance/inheritance_graph.py @@ -189,9 +189,8 @@ class PrinterInheritanceGraph(AbstractPrinter): Args: filename(string) """ - - if filename == "": - filename = "contracts.dot" + if filename == "" or filename == ".": + filename = "inheritance-graph.dot" if not filename.endswith(".dot"): filename += ".inheritance-graph.dot" info = "Inheritance Graph: " + filename + "\n" From ea0ad70a2ede93a5fe802ad85cef453368346a16 Mon Sep 17 00:00:00 2001 From: Josselin Date: Tue, 12 Jan 2021 11:25:24 +0100 Subject: [PATCH 2/2] Fix pylint --- slither/printers/inheritance/inheritance_graph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slither/printers/inheritance/inheritance_graph.py b/slither/printers/inheritance/inheritance_graph.py index 396680bb6..f0da17c59 100644 --- a/slither/printers/inheritance/inheritance_graph.py +++ b/slither/printers/inheritance/inheritance_graph.py @@ -189,7 +189,7 @@ class PrinterInheritanceGraph(AbstractPrinter): Args: filename(string) """ - if filename == "" or filename == ".": + if filename in ("", "."): filename = "inheritance-graph.dot" if not filename.endswith(".dot"): filename += ".inheritance-graph.dot"