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,9 +1,12 @@
from __future__ import annotations
import logging
from datetime import datetime
from typing import cast
from typing import Any, cast
from xml.parsers.expat import ExpatError
import pytz
import requests
from rss_parser import Parser as RSSParser
from rss_parser.models.rss import RSS
@@ -22,10 +25,10 @@ class WOTA(HTTPAlertProvider):
ALERTS_URL = "https://www.wota.org.uk/alerts_rss.php"
RSS_DATE_TIME_FORMAT = "%a, %d %b %Y %H:%M:%S %z"
def __init__(self, provider_config):
def __init__(self, provider_config: dict[str, Any]) -> None:
super().__init__("WOTA", 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 = []
try: