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
+7 -3
View File
@@ -1,7 +1,11 @@
from __future__ import annotations
import json
from datetime import datetime
from typing import Any
import pytz
import requests
from core.enums import ActivityName, ActivityRefType
from data.activity_ref import ActivityRef
@@ -15,11 +19,11 @@ class Towers(HTTPSpotProvider):
POLL_INTERVAL_SEC = 120
SPOTS_URL = "https://wwtota.com/api/cluster_live.php"
def __init__(self, provider_config):
def __init__(self, provider_config: dict[str, Any]) -> None:
super().__init__("Towers", provider_config, self.SPOTS_URL, self.POLL_INTERVAL_SEC)
def _http_response_to_spots(self, http_response):
new_spots = []
def _http_response_to_spots(self, http_response: requests.Response) -> list[Spot]:
new_spots: list[Spot] = []
response_fixed = http_response.text.replace("\\/", "/")
response_json = json.loads(response_fixed)