From d6998f5d94e0c591f6c7ec45041521a5e3fb467b Mon Sep 17 00:00:00 2001 From: Arohan Ajit Date: Wed, 2 Oct 2024 14:40:49 -0400 Subject: [PATCH 1/4] fixed all 841 --- gui/wxpython/iscatt/controllers.py | 3 --- gui/wxpython/iscatt/plots.py | 8 -------- 2 files changed, 11 deletions(-) diff --git a/gui/wxpython/iscatt/controllers.py b/gui/wxpython/iscatt/controllers.py index aed917aacad..4cd1c3c66f6 100644 --- a/gui/wxpython/iscatt/controllers.py +++ b/gui/wxpython/iscatt/controllers.py @@ -192,9 +192,7 @@ def SetDataDone(self, event): del self.busy self.data_set = True - todo = event.ret self.bad_bands = event.ret - bands = self.core.GetBands() self.bad_rasts = event.ret self.cats_mgr.SetData() @@ -809,7 +807,6 @@ def ExportCatRast(self, cat_id): def OnExportCatRastDone(self, event): ret, err = event.ret if ret == 0: - cat_attrs = self.GetCategoryAttrs(event.kwds["cat_id"]) GMessage( _("Scatter plot raster of class <%s> exported to raster map <%s>.") % (event.userdata["name"], event.kwds["rast_name"]) diff --git a/gui/wxpython/iscatt/plots.py b/gui/wxpython/iscatt/plots.py index a29098e8bcd..a615cedc918 100644 --- a/gui/wxpython/iscatt/plots.py +++ b/gui/wxpython/iscatt/plots.py @@ -255,7 +255,6 @@ def Plot(self, cats_order, scatts, ellipses, styles): if not e: continue - colors = styles[cat_id]["color"].split(":") if self.transpose: e["theta"] = 360 - e["theta"] + 90 if e["theta"] >= 360: @@ -355,9 +354,6 @@ def ZoomRectangle(self, event): if event.button != 1: return - cur_xlim = self.axes.get_xlim() - cur_ylim = self.axes.get_ylim() - x1, y1 = event.xdata, event.ydata x2 = deepcopy(self.zoom_rect_coords["x"]) y2 = deepcopy(self.zoom_rect_coords["y"]) @@ -651,13 +647,9 @@ def __init__(self, ax, pol, empty_pol): x, y = zip(*self.pol.xy) - style = self._getPolygonStyle() - self.line = Line2D(x, y, marker="o", markerfacecolor="r", animated=True) self.ax.add_line(self.line) # self._update_line(pol) - - cid = self.pol.add_callback(self.poly_changed) self.moving_ver_idx = None # the active vert self.mode = None From 3b888c03ee5b2089c020e4727040e31b35343946 Mon Sep 17 00:00:00 2001 From: Arohan Ajit Date: Wed, 2 Oct 2024 15:21:50 -0400 Subject: [PATCH 2/4] updated flake8 --- .flake8 | 1 - 1 file changed, 1 deletion(-) diff --git a/.flake8 b/.flake8 index 09706c297d9..737d8880c4f 100644 --- a/.flake8 +++ b/.flake8 @@ -27,7 +27,6 @@ per-file-ignores = gui/scripts/d.wms.py: E501 gui/wxpython/image2target/*: F841, E722 gui/wxpython/image2target/g.gui.image2target.py: E501, F841 - gui/wxpython/iscatt/*: F841, E722 gui/wxpython/lmgr/frame.py: F841, E722 # layertree still includes some formatting issues (it is ignored by Black) gui/wxpython/lmgr/layertree.py: E722, E266, W504, E225 From 7580484bcb04eb25593f48235b4e416019cffa0f Mon Sep 17 00:00:00 2001 From: Arohan Ajit Date: Thu, 3 Oct 2024 16:32:38 -0400 Subject: [PATCH 3/4] reverted add_callback --- gui/wxpython/iscatt/plots.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gui/wxpython/iscatt/plots.py b/gui/wxpython/iscatt/plots.py index a615cedc918..87e3c3ce5b7 100644 --- a/gui/wxpython/iscatt/plots.py +++ b/gui/wxpython/iscatt/plots.py @@ -650,6 +650,9 @@ def __init__(self, ax, pol, empty_pol): self.line = Line2D(x, y, marker="o", markerfacecolor="r", animated=True) self.ax.add_line(self.line) # self._update_line(pol) + + self.pol.add_callback(self.poly_changed) + self.moving_ver_idx = None # the active vert self.mode = None From 36b3c6b59a366cf0afb33b13103a72e0379f15d1 Mon Sep 17 00:00:00 2001 From: Arohan Ajit Date: Thu, 3 Oct 2024 13:56:41 -0700 Subject: [PATCH 4/4] Update plots.py --- gui/wxpython/iscatt/plots.py | 1 - 1 file changed, 1 deletion(-) diff --git a/gui/wxpython/iscatt/plots.py b/gui/wxpython/iscatt/plots.py index 87e3c3ce5b7..9c6f50b3b9f 100644 --- a/gui/wxpython/iscatt/plots.py +++ b/gui/wxpython/iscatt/plots.py @@ -652,7 +652,6 @@ def __init__(self, ax, pol, empty_pol): # self._update_line(pol) self.pol.add_callback(self.poly_changed) - self.moving_ver_idx = None # the active vert self.mode = None