Autogenerated type safety parameterisation of all methods

This commit is contained in:
Ian Renton
2026-09-20 20:02:19 +01:00
parent 6037e742cc
commit 324dd1414b
132 changed files with 1228 additions and 706 deletions
+8 -6
View File
@@ -1,15 +1,17 @@
from __future__ import annotations
from core.config import SERVER_OWNER_CALLSIGN
from data.band import Band
# General software
SOFTWARE_VERSION = "2.2-pre"
SOFTWARE_VERSION: str = "2.2-pre"
# HTTP headers used for spot providers that use HTTP
HTTP_HEADERS = {"User-Agent": f"Spothole v{SOFTWARE_VERSION} (operated by {SERVER_OWNER_CALLSIGN})"}
HAMQTH_PRG = f"Spothole v{SOFTWARE_VERSION} operated by {SERVER_OWNER_CALLSIGN}".replace(" ", "_")
HTTP_HEADERS: dict[str, str] = {"User-Agent": f"Spothole v{SOFTWARE_VERSION} (operated by {SERVER_OWNER_CALLSIGN})"}
HAMQTH_PRG: str = f"Spothole v{SOFTWARE_VERSION} operated by {SERVER_OWNER_CALLSIGN}".replace(" ", "_")
# Band definitions
BANDS = [
BANDS: list[Band] = [
Band(name="2200m", start_freq=135700, end_freq=137800),
Band(name="600m", start_freq=472000, end_freq=479000),
Band(name="160m", start_freq=1800000, end_freq=2000000, is_ham_hf=True),
@@ -37,11 +39,11 @@ BANDS = [
Band(name="47GHz", start_freq=47000000000, end_freq=47200000000),
Band(name="76GHz", start_freq=75500000000, end_freq=81500000000),
]
UNKNOWN_BAND = Band(name="Unknown", start_freq=0, end_freq=0)
UNKNOWN_BAND: Band = Band(name="Unknown", start_freq=0, end_freq=0)
# Propagation modes used in VHF/UHF DX cluster comments, e.g. "JN61ES<ES>JM56XT". I don't think there's an official list
# of these anywhere, but here are some I've seen or seen reference to
PROPAGATION_MODES = {
PROPAGATION_MODES: dict[str, str] = {
"F2": "F2 layer ionospheric",
"ES": "Sporadic-E",
"TR": "Tropospheric ducting",