Use ruff linter to fix issues and provide consistent formatting

This commit is contained in:
Ian Renton
2026-08-15 08:25:54 +01:00
parent 7391c28cd0
commit af3f82c14d
121 changed files with 1989 additions and 996 deletions
+19 -4
View File
@@ -4,7 +4,9 @@ from time import sleep
from pyhamtools.locator import latlong_to_locator
from data.sig_ref import SIGRef
from providers.sigrefdata.file_download_sig_ref_data_provider import FileDownloadSIGRefDataProvider
from providers.sigrefdata.file_download_sig_ref_data_provider import (
FileDownloadSIGRefDataProvider,
)
class IOTA(FileDownloadSIGRefDataProvider):
@@ -29,10 +31,23 @@ class IOTA(FileDownloadSIGRefDataProvider):
try:
grid = latlong_to_locator(latitude, longitude, 6)
except ValueError:
logging.debug(f"Error converting lat/lon to locator for an IOTA reference %f %f", latitude, longitude)
logging.debug(
"Error converting lat/lon to locator for an IOTA reference %f %f",
latitude,
longitude,
)
new_data.append(SIGRef(sig=self.SIG, id=ref_id, name=ref["name"],
ref_type="Island", grid=grid, latitude=latitude, longitude=longitude))
new_data.append(
SIGRef(
sig=self.SIG,
id=ref_id,
name=ref["name"],
ref_type="Island",
grid=grid,
latitude=latitude,
longitude=longitude,
)
)
# Bail out if a stop has been requested, i.e. the program is shutting down - no need to parse the rest
# of the data in this case