From d6924998d9dbf261989a61429b37489c450b8f15 Mon Sep 17 00:00:00 2001 From: Pierre-Antoine Rouby <pierre-antoine.rouby@inrae.fr> Date: Fri, 20 Oct 2023 17:25:36 +0200 Subject: [PATCH] Results: CustomPlot: Fix pep8. --- src/View/Results/CustomPlot/Plot.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/View/Results/CustomPlot/Plot.py b/src/View/Results/CustomPlot/Plot.py index 9733448f..06f911a2 100644 --- a/src/View/Results/CustomPlot/Plot.py +++ b/src/View/Results/CustomPlot/Plot.py @@ -86,7 +86,6 @@ class CustomPlot(PamhyrPlot): if "0-meter" in self._y_axes and "1-m3s" in self._y_axes: m3s_axes = self._axes["1-m3s"] - lines = {} if "elevation" in self._y: meter_axes.set_ylim( @@ -147,11 +146,11 @@ class CustomPlot(PamhyrPlot): # Legend lns = reduce( - lambda acc, l: acc + l, - map(lambda l: lines[l], lines), + lambda acc, line: acc + line, + map(lambda line: lines[line], lines), [] ) - labs = list(map(lambda l: self._trad[l], lines)) + labs = list(map(lambda line: self._trad[line], lines)) self.canvas.axes.legend(lns, labs, loc="lower left") def _customize_x_axes_time(self, ts, mode="time"): @@ -272,16 +271,15 @@ class CustomPlot(PamhyrPlot): ) lines["discharge"] = line - self._customize_x_axes_time(ts) # Legend lns = reduce( - lambda acc, l: acc + l, - map(lambda l: lines[l], lines), + lambda acc, line: acc + line, + map(lambda line: lines[line], lines), [] ) - labs = list(map(lambda l: self._trad[l], lines)) + labs = list(map(lambda line: self._trad[line], lines)) self.canvas.axes.legend(lns, labs, loc="lower left") @timer -- GitLab