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,6 +1,10 @@
from __future__ import annotations
from datetime import datetime, timedelta
from typing import Any
import pytz
import requests
from bs4 import BeautifulSoup
from core.enums import ActivityName
@@ -15,10 +19,10 @@ class BOTA(HTTPAlertProvider):
POLL_INTERVAL_SEC = 1800
ALERTS_URL = "https://www.beachesontheair.com/"
def __init__(self, provider_config):
def __init__(self, provider_config: dict[str, Any]) -> None:
super().__init__("BOTA", 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 = []
# Find the table of upcoming alerts
bs = BeautifulSoup(http_response.content.decode("utf-8-sig"), features="lxml")