From e4810f82d0f19184c6707f2b53556dd29daa86c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Boisselier?= Date: Thu, 18 Apr 2024 22:55:57 +0200 Subject: [PATCH] changed target of Flake8 to 3.9 to avoid some errors with older debian versions --- pyproject.toml | 2 +- src/graph_belts.py | 2 +- src/graph_vibrations.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b1cfa4b..42306ed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ Changelog = "https://github.com/Frix-x/klippain-shaketune/releases" [tool.ruff] line-length = 120 # We all have modern screens now and I believe this should be brought in line with current technology indent-width = 4 -target-version = "py310" +target-version = "py39" [tool.ruff.lint] select = ["E4", "E7", "E9", "F", "B"] diff --git a/src/graph_belts.py b/src/graph_belts.py index e4c56d7..70a797d 100755 --- a/src/graph_belts.py +++ b/src/graph_belts.py @@ -355,7 +355,7 @@ def plot_difference_spectrogram(ax, signal1, signal2, t, bins, combined_divergen KLIPPAIN_COLORS['dark_purple'], ] cm = matplotlib.colors.LinearSegmentedColormap.from_list( - 'klippain_divergent', list(zip([0, 0.25, 0.5, 0.75, 1], colors, strict=True)) + 'klippain_divergent', list(zip([0, 0.25, 0.5, 0.75, 1], colors)) ) norm = matplotlib.colors.TwoSlopeNorm(vmin=np.min(combined_divergent), vcenter=0, vmax=np.max(combined_divergent)) ax.imshow( diff --git a/src/graph_vibrations.py b/src/graph_vibrations.py index 5d23eb0..d32acf8 100755 --- a/src/graph_vibrations.py +++ b/src/graph_vibrations.py @@ -123,7 +123,7 @@ def compute_dir_speed_spectrogram(measured_speeds, data, kinematics='cartesian', sqrt_2_inv = 1 / math.sqrt(2) # Compute the spectrum vibrations for each angle and speed combination - for target_angle_idx, (cos_val, sin_val) in enumerate(zip(cos_vals, sin_vals, strict=True)): + for target_angle_idx, (cos_val, sin_val) in enumerate(zip(cos_vals, sin_vals)): for target_speed_idx, target_speed in enumerate(spectrum_speeds): if kinematics == 'cartesian': speed_1 = np.abs(target_speed * cos_val)