Skip to content

Commit

Permalink
apply ruff fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
echoix committed Jul 18, 2024
1 parent 6bca65a commit cb9113e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion gui/wxpython/mapwin/buffered.py
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ def DragMap(self, moveto):

def DragItem(self, id, coords):
"""Drag an overlay decoration item"""
if id == 99 or id == "" or id is None:
if id in (99, "") or id is None:
return
Debug.msg(5, "BufferedWindow.DragItem(): id=%d" % id)
x, y = self.lastpos
Expand Down
2 changes: 1 addition & 1 deletion gui/wxpython/wxplot/histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def SetupHistogram(self):
# set xlabel based on first raster map in list to be histogrammed
#
units = self.raster[self.rasterList[0]]["units"]
if units != "" and units != "(none)" and units is not None:
if units not in ("", "(none)") and units is not None:
self.xlabel = _("Raster cell values %s") % units
else:
self.xlabel = _("Raster cell values")
Expand Down
7 changes: 1 addition & 6 deletions gui/wxpython/wxplot/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,12 +312,7 @@ def CreateDatalist(self, raster, coords):
for line in ret.splitlines():
dist, elev = line.strip().split(" ")
if (
dist is None
or dist == ""
or dist == "nan"
or elev is None
or elev == ""
or elev == "nan"
dist is None or dist in ("", "nan") or elev is None or elev in ("", "nan")
):
continue
dist = float(dist)
Expand Down

0 comments on commit cb9113e

Please sign in to comment.