Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wxGUI: Fixed F841 in iscatt/ #4432

Merged
merged 6 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
Expand Down
3 changes: 0 additions & 3 deletions gui/wxpython/iscatt/controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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"])
Expand Down
8 changes: 1 addition & 7 deletions gui/wxpython/iscatt/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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"])
Expand Down Expand Up @@ -651,13 +647,11 @@ 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)
arohanajit marked this conversation as resolved.
Show resolved Hide resolved
self.pol.add_callback(self.poly_changed)
self.moving_ver_idx = None # the active vert

self.mode = None
Expand Down
Loading