Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Arohan Ajit authored and Arohan Ajit committed Jan 30, 2025
1 parent 6a32875 commit ab8df07
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
2 changes: 0 additions & 2 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ per-file-ignores =
gui/wxpython/mapdisp/main.py: E722
gui/wxpython/mapdisp/test_mapdisp.py: E501
gui/wxpython/mapswipe/g.gui.mapswipe.py: E501
gui/wxpython/mapwin/base.py: E722
gui/wxpython/mapwin/buffered.py: E722
gui/wxpython/timeline/g.gui.timeline.py: E501
# Generated file
gui/wxpython/menustrings.py: E501
Expand Down
6 changes: 3 additions & 3 deletions gui/wxpython/mapwin/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def HandlersCaller(self, event, handlers):
for handler in handlers:
try:
handler(event)
except:
except Exception:
handlers.remove(handler)
GError(
parent=self,
Expand Down Expand Up @@ -308,7 +308,7 @@ def UnregisterAllHandlers(self):
try:
handler("unregistered")
handlers.remove(handler)
except:
except Exception:
GError(
parent=self,
message=_(
Expand Down Expand Up @@ -347,7 +347,7 @@ def UnregisterMouseEventHandler(self, event, handler):
grass.warning(
_("Handler: %s was not registered") % handler.__name__
)
except:
except Exception:
GError(
parent=self,
message=_(
Expand Down
14 changes: 7 additions & 7 deletions gui/wxpython/mapwin/buffered.py
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ def _updateMFinished(self, renderVector=True):
for item in self.graphicsSetList:
try:
item.Draw()
except:
except Exception:
GError(
parent=self,
message=_(
Expand Down Expand Up @@ -1182,7 +1182,7 @@ def MouseDraw(self, pdc=None, begin=None, end=None):
r.Inflate(4, 4)
try:
pdc.ClearId(boxid)
except:
except (KeyError, ValueError, AttributeError):
pass
self.RefreshRect(r, False)
pdc.SetId(boxid)
Expand All @@ -1199,7 +1199,7 @@ def MouseDraw(self, pdc=None, begin=None, end=None):
r.Inflate(4, 4)
try:
pdc.ClearId(self.lineid)
except:
except (KeyError, ValueError, AttributeError):
pass
self.RefreshRect(r, False)
pdc.SetId(self.lineid)
Expand Down Expand Up @@ -1736,13 +1736,13 @@ def ClearLines(self, pdc=None):
try:
pdc.ClearId(self.lineid)
pdc.RemoveId(self.lineid)
except:
except (KeyError, ValueError):
pass

try:
pdc.ClearId(self.plineid)
pdc.RemoveId(self.plineid)
except:
except (KeyError, ValueError):
pass

Debug.msg(
Expand All @@ -1764,7 +1764,7 @@ def Pixel2Cell(self, xyCoords):
try:
x = int(xyCoords[0])
y = int(xyCoords[1])
except:
except (TypeError, ValueError, IndexError):
return None

if self.Map.region["ewres"] > self.Map.region["nsres"]:
Expand All @@ -1785,7 +1785,7 @@ def Cell2Pixel(self, enCoords):
try:
east = float(enCoords[0])
north = float(enCoords[1])
except:
except (TypeError, ValueError, IndexError):
return None

if self.Map.region["ewres"] > self.Map.region["nsres"]:
Expand Down

0 comments on commit ab8df07

Please sign in to comment.