From d124ada2ffb995d48769b673609cf70e57b67278 Mon Sep 17 00:00:00 2001 From: Arne de Laat Date: Sat, 12 Aug 2023 13:47:08 +0200 Subject: [PATCH] Replace type check using is by isinstance --- publicdb/analysissessions/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/publicdb/analysissessions/views.py b/publicdb/analysissessions/views.py index 21cfec97..c6b39e7c 100644 --- a/publicdb/analysissessions/views.py +++ b/publicdb/analysissessions/views.py @@ -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]