Skip to content

Commit

Permalink
Small fix for modern flake8. (#289)
Browse files Browse the repository at this point in the history
Make sure to use isinstance.

Signed-off-by: Chris Lalancette <[email protected]>
  • Loading branch information
clalancette authored Mar 25, 2024
1 parent abaa07d commit ee7b126
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qt_dotgraph/src/qt_dotgraph/pydotfactory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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', '')

0 comments on commit ee7b126

Please sign in to comment.