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
+18 -8
View File
@@ -13,18 +13,18 @@ class Callsign:
# "Home" call, i.e. with any prefixes and suffixes stripped off
home_call: str | None = None
# Operator name
name : str | None = None
name: str | None = None
# QTH (location), free text
qth : str | None = None
qth: str | None = None
# Maidenhead grid locator. Depending on the source of lookup this could be a home location from QRZ/HamQTH or just
# the centre of the country they're operating in if no other data is available.
grid : str | None = None
grid: str | None = None
# Latitude. Depending on the source of lookup this could be a home location from QRZ/HamQTH or just
# the centre of the country they're operating in if no other data is available.
latitude : float | None = None
latitude: float | None = None
# Longitude. Depending on the source of lookup this could be a home location from QRZ/HamQTH or just
# the centre of the country they're operating in if no other data is available.
longitude : float | None = None
longitude: float | None = None
# Country in which the callsign indicates they are operating
country: str | None = None
# Continent in which the callsign indicates they are operating
@@ -42,6 +42,16 @@ class Callsign:
"""Utility method to indicate that the callsign data is fully populated. Multiple providers can return data for
a callsign, and we try them in sequence until we have all the data we can, in which case there's no point
querying any other providers."""
return self.home_call is not None and self.name is not None and self.qth is not None and self.grid is not None\
and self.latitude is not None and self.longitude is not None and self.country is not None and self.continent\
is not None and self.dxcc_id is not None and self.cq_zone is not None and self.itu_zone is not None
return (
self.home_call is not None
and self.name is not None
and self.qth is not None
and self.grid is not None
and self.latitude is not None
and self.longitude is not None
and self.country is not None
and self.continent is not None
and self.dxcc_id is not None
and self.cq_zone is not None
and self.itu_zone is not None
)