diff --git a/.flake8 b/.flake8 index d704112048f..32b0191e00c 100644 --- a/.flake8 +++ b/.flake8 @@ -26,8 +26,8 @@ per-file-ignores = doc/gui/wxpython/example/dialogs.py: F401 gui/scripts/d.wms.py: E501 gui/wxpython/image2target/*: F841, E722 - gui/wxpython/image2target/g.gui.image2target.py: E501 - gui/wxpython/iscatt/*: F841, E722, F405, F403 + gui/wxpython/image2target/g.gui.image2target.py: E501, F841 + gui/wxpython/iscatt/*: F841, F405, F403 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 diff --git a/gui/wxpython/iscatt/controllers.py b/gui/wxpython/iscatt/controllers.py index e8884f4f78b..aed917aacad 100644 --- a/gui/wxpython/iscatt/controllers.py +++ b/gui/wxpython/iscatt/controllers.py @@ -597,7 +597,7 @@ def _renderscattplts(self, scatt_ids, cats, cats_attrs): try: self.cat_ids.remove(c) scatt_dt[c]["render"] = True - except: + except ValueError: scatt_dt[c]["render"] = False if self.scatt_mgr.pol_sel_mode[0]: @@ -674,7 +674,7 @@ def ChangePosition(self, cat_id, new_pos): try: pos = self.cats_ids.index(cat_id) - except: + except ValueError: return False if pos > new_pos: diff --git a/gui/wxpython/iscatt/frame.py b/gui/wxpython/iscatt/frame.py index 45f50622d2f..803b2344144 100644 --- a/gui/wxpython/iscatt/frame.py +++ b/gui/wxpython/iscatt/frame.py @@ -249,7 +249,7 @@ def CursorPlotMove(self, x, y, scatt_id): x = int(round(x)) y = int(round(y)) coords = True - except: + except TypeError: coords = False pane = self._getPane(scatt_id)