ruff fixes

This commit is contained in:
Ian Renton
2026-09-18 18:38:35 +01:00
parent 40033d122e
commit 1a1743d11c
18 changed files with 34 additions and 21 deletions
+1 -1
View File
@@ -84,7 +84,7 @@ def get_activity_ref_info(activity_name, ref_id):
activity_ref.latitude = ll[0]
activity_ref.longitude = ll[1]
except Exception:
logger.warning("Invalid lat/lon received for WAB/WAI reference")
logger.warning("Invalid lat/lon received for WAB/WAI reference", exc_info=True)
return activity_ref
elif activity_name.upper() == ActivityName.BOTA:
+2 -2
View File
@@ -1,6 +1,6 @@
import logging
import re
from math import floor
from math import floor, isnan
from pyproj import Transformer
from shapely.geometry import Point, Polygon
@@ -156,7 +156,7 @@ def lat_lon_for_grid_sw_corner_plus_size(grid):
lat -= 90.0
# Return None values on maths errors
if any(x != x for x in [lat, lon, lat_cell_size, lon_cell_size]):
if any(isnan(x) for x in [lat, lon, lat_cell_size, lon_cell_size]):
return None, None, None, None
return lat, lon, lat_cell_size, lon_cell_size