Skip to content

Commit

Permalink
Merge branch 'main' into prettier-html
Browse files Browse the repository at this point in the history
  • Loading branch information
echoix authored Nov 28, 2024
2 parents 5811458 + 231bb51 commit dc59b46
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
3 changes: 0 additions & 3 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ per-file-ignores =
gui/wxpython/iclass/frame.py: F405, F403
gui/wxpython/iclass/g.gui.iclass.py: E501
gui/wxpython/iclass/statistics.py: F841, F405, F403
gui/wxpython/location_wizard/dialogs.py: F841
gui/wxpython/location_wizard/wizard.py: E722
gui/wxpython/mapdisp/main.py: E722
gui/wxpython/mapdisp/test_mapdisp.py: E501
gui/wxpython/mapdisp/statusbar.py: F841
gui/wxpython/mapswipe/g.gui.mapswipe.py: E501
gui/wxpython/mapwin/base.py: E722
gui/wxpython/mapwin/buffered.py: E722
Expand All @@ -52,7 +50,6 @@ per-file-ignores =
python/grass/pygrass/vector/__init__.py: E402
python/grass/pygrass/raster/__init__.py: E402
python/grass/pygrass/vector/__init__.py: E402
python/grass/pygrass/raster/category.py: E721
python/grass/pygrass/utils.py: E402
python/grass/temporal/abstract_space_time_dataset.py: E722
python/grass/temporal/c_libraries_interface.py: E722
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/location_wizard/dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ def OnValue(self, event):

except ValueError as e:
if len(event.GetString()) > 0 and event.GetString() != "-":
dlg = wx.MessageBox(
wx.MessageBox(
parent=self,
message=_("Invalid value: %s") % e,
caption=_("Error"),
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/mapdisp/statusbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ def Show(self):
self.SetValue(e.message)
# TODO: remove these excepts, they just hide errors, solve problems
# differently
except TypeError as e:
except TypeError:
self.SetValue("")
except AttributeError:
# during initialization MapFrame has no MapWindow
Expand Down
4 changes: 2 additions & 2 deletions python/grass/pygrass/raster/category.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,15 @@ def __repr__(self):
return "[{0}]".format(",\n ".join(cats))

def _chk_index(self, index):
if type(index) == str:
if isinstance(index, str):
try:
index = self.labels().index(index)
except ValueError:
raise KeyError(index)
return index

def _chk_value(self, value):
if type(value) == tuple:
if isinstance(value, tuple):
length = len(value)
if length == 2:
label, min_cat = value
Expand Down

0 comments on commit dc59b46

Please sign in to comment.