More ruff linter fixes

This commit is contained in:
Ian Renton
2026-08-15 08:43:19 +01:00
parent dd89ff4af7
commit a6e54f524d
43 changed files with 99 additions and 153 deletions
+2 -2
View File
@@ -73,7 +73,7 @@ def lat_lon_for_grid_sw_corner(grid):
"""Convert a Maidenhead grid reference of arbitrary precision to the lat/long of the southwest corner of the square.
Returns None if the grid format is invalid."""
lat, lon, lat_cell_size, lon_cell_size = lat_lon_for_grid_sw_corner_plus_size(grid)
lat, lon, _lat_cell_size, _lon_cell_size = lat_lon_for_grid_sw_corner_plus_size(grid)
if lat is not None and lon is not None:
return [lat, lon]
else:
@@ -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]): # NaN check
if any(x != 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