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
+6 -3
View File
@@ -1,5 +1,8 @@
from __future__ import annotations
import csv
from time import sleep
from typing import Any
from pyhamtools.locator import latlong_to_locator
@@ -16,11 +19,11 @@ class DME(LocalFileActivityRefDataProvider):
ACTIVITY = ActivityName.DME
PATH = "datafiles/MUNICIPIOS.csv"
def __init__(self, provider_config):
def __init__(self, provider_config: dict[str, Any]) -> None:
super().__init__(self.ACTIVITY, provider_config, self.PATH)
def _file_to_data(self, path):
new_data = []
def _file_to_data(self, path: str) -> list[ActivityRef]:
new_data: list[ActivityRef] = []
with open(path, encoding="latin-1") as _f:
for row in csv.DictReader(_f, delimiter=";"):
# Store reference IDs with the "DME-" prefix rather than just the number. This will prevent Spothole