Skip to content

Commit

Permalink
wxGUI: FIxed F841 in colorrules.py (#4490)
Browse files Browse the repository at this point in the history
  • Loading branch information
arohanajit authored Oct 11, 2024
1 parent 426bf74 commit cbc3ff4
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions gui/wxpython/modules/colorrules.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,9 @@ def LoadRules(self):
int, self.ruleslines[item][self.attributeType].split(":")
)
except ValueError as e:
message = _("Bad color format. Use color format '0:0:0'")
message = (
_("Bad color format '%s'. Use color format '0:0:0'") % e
)
self.mainPanel.FindWindowById(item + 2000).SetValue((r, g, b))
else:
value = float(self.ruleslines[item][self.attributeType])
Expand Down Expand Up @@ -410,7 +412,6 @@ def _initLayer(self):
if layer:
mapLayer = self.layerTree.GetLayerInfo(layer, key="maplayer")
name = mapLayer.GetName()
type = mapLayer.GetType()
self.selectionInput.SetValue(name)
self.inmap = name

Expand Down Expand Up @@ -1412,7 +1413,7 @@ def AddTemporaryColumn(self, type):
modul = "v.db.addcolumn"
else:
modul = "v.db.addcol"
ret = RunCommand(
RunCommand(
modul,
parent=self,
map=self.inmap,
Expand All @@ -1430,7 +1431,7 @@ def DeleteTemporaryColumn(self):
modul = "v.db.dropcolumn"
else:
modul = "v.db.dropcol"
ret = RunCommand(
RunCommand(
modul,
map=self.inmap,
layer=self.properties["layer"],
Expand Down Expand Up @@ -1505,7 +1506,7 @@ def OnAddColumn(self, event):
modul = "v.db.addcolumn"
else:
modul = "v.db.addcol"
ret = RunCommand(
RunCommand(
modul,
map=self.inmap,
layer=self.properties["layer"],
Expand Down

0 comments on commit cbc3ff4

Please sign in to comment.