Fix some IDE warnings, mostly around type safety on the Python side

This commit is contained in:
Ian Renton
2026-06-19 21:33:46 +01:00
parent 05ac652cee
commit edb2641f76
42 changed files with 319 additions and 187 deletions

View File

@@ -1,7 +1,10 @@
from datetime import datetime
from typing import Any
import pytz
import tornado
from tornado import httputil
from tornado.web import Application
from core.config import ALLOW_SPOTTING, WEB_UI_OPTIONS, BASE_URL, SERVER_OWNER_CALLSIGN
from core.constants import SOFTWARE_VERSION
@@ -11,6 +14,11 @@ from core.prometheus_metrics_handler import page_requests_counter
class PageTemplateHandler(tornado.web.RequestHandler):
"""Handler for all HTML pages generated from templates"""
def __init__(self, application: "Application", request: httputil.HTTPServerRequest, **kwargs: Any):
self._template_name = None
self._web_server_metrics = None
super().__init__(application, request, **kwargs)
def initialize(self, template_name, web_server_metrics):
self._template_name = template_name
self._web_server_metrics = web_server_metrics