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
+8 -5
View File
@@ -1,3 +1,5 @@
from __future__ import annotations
import logging
import re
from typing import Any
@@ -9,6 +11,7 @@ from tornado.web import Application
from core.activity_utils import get_ref_regex_for_activity
from core.config import ALLOW_SPOTTING
from core.constants import UNKNOWN_BAND
from core.live_data_cache import LiveDataCache
from core.utils import infer_band_from_freq, safe_json_dumps
from data.spot import Spot
@@ -20,17 +23,17 @@ class V1APISpotHandler(tornado.web.RequestHandler):
def __init__(
self,
application: "Application",
application: Application,
request: httputil.HTTPServerRequest,
**kwargs: Any,
):
self._spots = None
) -> None:
self._spots: LiveDataCache | None = None
super().__init__(application, request, **kwargs)
def initialize(self, spots):
def initialize(self, spots: LiveDataCache) -> None:
self._spots = spots
def post(self):
def post(self) -> None:
try:
# Reject if not allowed
if not ALLOW_SPOTTING: