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 -2
View File
@@ -1,7 +1,11 @@
from __future__ import annotations
import logging
from datetime import datetime
from typing import Any
import pytz
import requests
from core.enums import ActivityName
from data.activity_ref import ActivityRef
@@ -17,10 +21,10 @@ class ParksNPeaks(HTTPAlertProvider):
POLL_INTERVAL_SEC = 1800
ALERTS_URL = "https://parksnpeaks.org/api/ALERTS/"
def __init__(self, provider_config):
def __init__(self, provider_config: dict[str, Any]) -> None:
super().__init__("ParksNPeaks", provider_config, self.ALERTS_URL, self.POLL_INTERVAL_SEC)
def _http_response_to_alerts(self, http_response):
def _http_response_to_alerts(self, http_response: requests.Response) -> list[Alert]:
new_alerts = []
# Iterate through source data
for source_alert in http_response.json():