Skip to content

Commit

Permalink
type -> isinstance()
Browse files Browse the repository at this point in the history
  • Loading branch information
sjanssen2 committed Sep 27, 2023
1 parent 869e97b commit 88f7839
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions phylofiller/test/test_rna.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ def dpElements(fig):
width_rect = []
height_rect = []
for c in fig.get_axes()[0]._children:
if type(c) == matplotlib.lines.Line2D:
if isinstance(c, matplotlib.lines.Line2D):
xs_lines.extend(list(c._x))
ys_lines.extend(list(c._y))
elif type(c) == matplotlib.patches.Rectangle:
elif isinstance(c, matplotlib.patches.Rectangle):
xs_rect.append(c._x0)
ys_rect.append(c._y0)
width_rect.append(c._width)
Expand Down

0 comments on commit 88f7839

Please sign in to comment.