From ee7b1267d65590f54b4fb34af241935c9433bce5 Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Mon, 25 Mar 2024 12:26:55 -0400 Subject: [PATCH] Small fix for modern flake8. (#289) Make sure to use isinstance. Signed-off-by: Chris Lalancette --- qt_dotgraph/src/qt_dotgraph/pydotfactory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt_dotgraph/src/qt_dotgraph/pydotfactory.py b/qt_dotgraph/src/qt_dotgraph/pydotfactory.py index 39e60511..bee31eb6 100644 --- a/qt_dotgraph/src/qt_dotgraph/pydotfactory.py +++ b/qt_dotgraph/src/qt_dotgraph/pydotfactory.py @@ -176,7 +176,7 @@ def add_edge_to_graph( def create_dot(self, graph): dot = graph.create_dot() - if type(dot) != str: + if not isinstance(dot, str): dot = dot.decode() # sadly pydot generates line wraps cutting between numbers return dot.replace('\\%s' % os.linesep, '').replace('\\\n', '')