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 and E266 in lmgr/ #4439

Merged
merged 2 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
5 changes: 2 additions & 3 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ 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/lmgr/frame.py: F841, E722
gui/wxpython/lmgr/frame.py: E722
# layertree still includes some formatting issues (it is ignored by Black)
gui/wxpython/lmgr/layertree.py: E722, E266, W504, E225
gui/wxpython/lmgr/workspace.py: F841
gui/wxpython/lmgr/layertree.py: E722
gui/wxpython/modules/*: F841, E722
gui/wxpython/nviz/*: F841, E266, E722, F403, F405
gui/wxpython/photo2image/*: F841, E722, E265
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/lmgr/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -1950,7 +1950,7 @@ def AddMaps(self, mapLayers, ltype, check=False):
)
return

newItem = maptree.AddLayer(
maptree.AddLayer(
ltype=ltype,
lname=layerName,
lchecked=check,
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/lmgr/layertree.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ def OnLayerContextMenu(self, event):
# self.popupMenu.Enable(self.popupID['bgmap'], False)
self.popupMenu.Enable(self.popupID["topo"], False)
# else:
### self.popupMenu.Enable(self.popupID['bgmap'], True)
# self.popupMenu.Enable(self.popupID['bgmap'], True)

item = wx.MenuItem(
self.popupMenu, id=self.popupID["meta"], text=_("Metadata")
Expand Down
11 changes: 8 additions & 3 deletions gui/wxpython/lmgr/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,10 @@ def Load(self, filename):
parent=self.lmgr,
message=_(
"Reading workspace file <%s> failed.\n"
"Invalid file, unable to parse XML document."
"Invalid file, unable to parse XML document.\n"
"Error details: %s"
)
% filename,
% (filename, str(e)),
)
return False

Expand Down Expand Up @@ -436,7 +437,11 @@ def SaveToFile(self, filename):
except Exception as e:
GError(
parent=self.lmgr,
message=_("Writing current settings to workspace file failed."),
message=_(
"Writing current settings to workspace file <%s> failed.\n"
"Error details: %s"
)
% (tmpfile, str(e)),
)
return False

Expand Down
Loading