Skip to content

Commit

Permalink
Replace type check using is by isinstance
Browse files Browse the repository at this point in the history
  • Loading branch information
153957 committed Aug 12, 2023
1 parent 4c4593e commit d124ada
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion publicdb/analysissessions/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def get_cores(slug, coincidences):


def create_plot_object(x_values, y_series, x_label, y_label):
if type(y_series[0]) != list:
if not isinstance(y_series[0], list):
y_series = [y_series]

data = [[[xv, yv] for xv, yv in zip(x_values, y_values)] for y_values in y_series]
Expand Down

0 comments on commit d124ada

Please sign in to comment.