From 253efc23cbeaf1fb279ec35689344fe0f767e42a Mon Sep 17 00:00:00 2001 From: Matthias Diener Date: Sun, 12 Nov 2023 17:19:12 -0600 Subject: [PATCH] mypy 1.7 fixes (#153) --- logpyle/__init__.py | 6 +++--- logpyle/runalyzer.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/logpyle/__init__.py b/logpyle/__init__.py index 78146ea..78b0b85 100644 --- a/logpyle/__init__.py +++ b/logpyle/__init__.py @@ -1197,13 +1197,13 @@ def get_plot_data(self, expr_x: Expression, expr_y: Expression, if max_step is not None: data = [(step, tup) for step, tup in data if step <= max_step] - stepless_data = [tup for step, tup in data] + stepless_data = [tup for _step, tup in data] if stepless_data: data_x, data_y = list(zip(*stepless_data)) else: - data_x = [] - data_y = [] + data_x = () + data_y = () return (data_x, descr_x, unit_x), \ (data_y, descr_y, unit_y) diff --git a/logpyle/runalyzer.py b/logpyle/runalyzer.py index 6e8f291..717bb4b 100644 --- a/logpyle/runalyzer.py +++ b/logpyle/runalyzer.py @@ -135,8 +135,8 @@ def do_plot(x: List[float], y: List[float], style_idx[0] += 1 style_idx = [0] - for x, y, rest in split_cursor(cursor): - do_plot(x, y, rest) # type: ignore[arg-type] + for my_x, my_y, rest in split_cursor(cursor): + do_plot(my_x, my_y, rest) # type: ignore[arg-type] if small_legend: from matplotlib.font_manager import FontProperties