Skip to content

Commit

Permalink
wxGUI: Fixed F841 in modules/ (OSGeo#4528)
Browse files Browse the repository at this point in the history
  • Loading branch information
arohanajit authored Oct 17, 2024
1 parent a740da1 commit 4e8b0bf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ per-file-ignores =
doc/python/m.distance.py: E501
gui/scripts/d.wms.py: E501
gui/wxpython/image2target/g.gui.image2target.py: E501
gui/wxpython/modules/*: F841, E722
gui/wxpython/modules/*: E722
gui/wxpython/nviz/*: F841, E266, E722, F403, F405
gui/wxpython/photo2image/*: F841, E722, E265
gui/wxpython/photo2image/g.gui.photo2image.py: E501, F841
Expand Down
1 change: 0 additions & 1 deletion gui/wxpython/modules/histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,6 @@ def SaveToFile(self, event):

def PrintMenu(self, event):
"""Print options and output menu"""
point = wx.GetMousePosition()
printmenu = Menu()
# Add items to the menu
setup = wx.MenuItem(printmenu, id=wx.ID_ANY, text=_("Page setup"))
Expand Down
11 changes: 2 additions & 9 deletions gui/wxpython/modules/import_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,6 @@ def OnRun(self, event):
dsn = self.dsnInput.GetDsn()
if not dsn:
return
ext = self.dsnInput.GetFormatExt()

for layer, output, listId in data:
userData = {}
Expand Down Expand Up @@ -613,7 +612,7 @@ def OnRun(self, event):
return

if not data:
GMessage(_("No layers selected. Operation canceled."), parent=self)
GMessage(parent=self, message=_("No layers selected. Operation canceled."))
return

if not self._validateOutputMapName():
Expand Down Expand Up @@ -644,13 +643,7 @@ def OnRun(self, event):
if ext and layer.rfind(ext) > -1:
layer = layer.replace("." + ext, "")
if "|" in layer:
layer, geometry = layer.split("|", 1)
else:
geometry = None

# TODO: v.import has no geometry option
# if geometry:
# cmd.append('geometry=%s' % geometry)
layer = layer.split("|", 1)[0]

cmd = self.getSettingsPageCmd()
cmd.append("input=%s" % dsn)
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/modules/mapsets_picker.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


def main():
app = wx.App()
wx.App()

dlg = MapsetAccess(parent=None)
dlg.CenterOnScreen()
Expand Down

0 comments on commit 4e8b0bf

Please sign in to comment.