From 4408203d5513ee8d3a3602e75bfc594160fe09c6 Mon Sep 17 00:00:00 2001 From: Ian Renton Date: Wed, 17 Jun 2026 18:08:02 +0100 Subject: [PATCH] Fix some IDE warnings (cherry picked from commit 8fc3cfa56da5b9ccff7b93d4b410179fb75793b5) --- alertproviders/parksnpeaks.py | 2 +- core/lookup_helper.py | 1 - server/handlers/api/alerts.py | 2 +- server/handlers/api/solar_conditions.py | 2 -- server/handlers/api/spots.py | 2 +- templates/about.html | 2 +- templates/add_spot.html | 4 ++-- templates/alerts.html | 4 ++-- templates/bands.html | 6 +++--- templates/base.html | 8 ++++---- templates/conditions.html | 4 ++-- templates/map.html | 6 +++--- templates/spots.html | 6 +++--- templates/status.html | 4 ++-- webassets/css/style.css | 4 ++-- 15 files changed, 27 insertions(+), 30 deletions(-) diff --git a/alertproviders/parksnpeaks.py b/alertproviders/parksnpeaks.py index 49b64ba..ad288eb 100644 --- a/alertproviders/parksnpeaks.py +++ b/alertproviders/parksnpeaks.py @@ -12,7 +12,7 @@ class ParksNPeaks(HTTPAlertProvider): """Alert provider for Parks n Peaks""" POLL_INTERVAL_SEC = 1800 - ALERTS_URL = "http://parksnpeaks.org/api/ALERTS/" + ALERTS_URL = "https://parksnpeaks.org/api/ALERTS/" def __init__(self, provider_config): super().__init__(provider_config, self.ALERTS_URL, self.POLL_INTERVAL_SEC) diff --git a/core/lookup_helper.py b/core/lookup_helper.py index 8bd1628..0e42525 100644 --- a/core/lookup_helper.py +++ b/core/lookup_helper.py @@ -18,7 +18,6 @@ from core.cache_utils import SEMI_STATIC_URL_DATA_CACHE from core.config import config from core.constants import BANDS, UNKNOWN_BAND, CW_MODES, PHONE_MODES, DATA_MODES, ALL_MODES, \ HTTP_HEADERS, HAMQTH_PRG, MODE_ALIASES -from data.lookup_credentials import LookupCredentials # QRZ XML field names differ from pyhamtools' normalised names; map them here. _QRZ_FIELD_MAP = { diff --git a/server/handlers/api/alerts.py b/server/handlers/api/alerts.py index e41b7dd..ae61f9c 100644 --- a/server/handlers/api/alerts.py +++ b/server/handlers/api/alerts.py @@ -143,7 +143,7 @@ class APIAlertsStreamHandler(tornado_eventsource.handler.EventSourceHandler): if self._alert_queue not in self._sse_alert_queues: logging.error("Web server cleared up a queue of an active connection!") self.close() - except: + except Exception as e: logging.warning("Exception in SSE callback, connection will be closed: %s", e, exc_info=True) self.close() diff --git a/server/handlers/api/solar_conditions.py b/server/handlers/api/solar_conditions.py index b38f6b8..1d684bc 100644 --- a/server/handlers/api/solar_conditions.py +++ b/server/handlers/api/solar_conditions.py @@ -1,11 +1,9 @@ -import json from datetime import datetime import pytz import tornado from core.prometheus_metrics_handler import api_requests_counter -from core.utils import serialize_everything class APISolarConditionsHandler(tornado.web.RequestHandler): diff --git a/server/handlers/api/spots.py b/server/handlers/api/spots.py index 9141b53..b435eba 100644 --- a/server/handlers/api/spots.py +++ b/server/handlers/api/spots.py @@ -145,7 +145,7 @@ class APISpotsStreamHandler(tornado_eventsource.handler.EventSourceHandler): if self._spot_queue not in self._sse_spot_queues: logging.error("Web server cleared up a queue of an active connection!") self.close() - except: + except Exception as e: logging.warning("Exception in SSE callback, connection will be closed: %s", e, exc_info=True) self.close() diff --git a/templates/about.html b/templates/about.html index 419d672..377dc5b 100644 --- a/templates/about.html +++ b/templates/about.html @@ -69,7 +69,7 @@

This software is dedicated to the memory of Tom G1PJB, SK, a friend and colleague who sadly passed away around the time I started writing it in Autumn 2025. I was looking forward to showing it to you when it was done.

- + {% end %} \ No newline at end of file diff --git a/templates/add_spot.html b/templates/add_spot.html index ca67a1d..6720d49 100644 --- a/templates/add_spot.html +++ b/templates/add_spot.html @@ -69,8 +69,8 @@ - - + + {% end %} \ No newline at end of file diff --git a/templates/alerts.html b/templates/alerts.html index 0c5ccb9..2d9cfe0 100644 --- a/templates/alerts.html +++ b/templates/alerts.html @@ -70,8 +70,8 @@ - - + + {% end %} \ No newline at end of file diff --git a/templates/bands.html b/templates/bands.html index 879dbf7..766a291 100644 --- a/templates/bands.html +++ b/templates/bands.html @@ -76,9 +76,9 @@ - - - + + + {% end %} \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index 14d6841..c3aa90f 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,6 +1,6 @@ {% extends "skeleton.html" %} {% block head_extra %} - + @@ -10,9 +10,9 @@ - - - + + + {% end %} {% block body %}
diff --git a/templates/conditions.html b/templates/conditions.html index 8b04a2e..43fc2a2 100644 --- a/templates/conditions.html +++ b/templates/conditions.html @@ -284,8 +284,8 @@
- - + + diff --git a/templates/map.html b/templates/map.html index 5b25c6a..937aff2 100644 --- a/templates/map.html +++ b/templates/map.html @@ -94,9 +94,9 @@ - - - + + + {% end %} \ No newline at end of file diff --git a/templates/spots.html b/templates/spots.html index 309968b..fab2fdb 100644 --- a/templates/spots.html +++ b/templates/spots.html @@ -104,9 +104,9 @@ - - - + + + {% end %} \ No newline at end of file diff --git a/templates/status.html b/templates/status.html index 3681101..73a98ac 100644 --- a/templates/status.html +++ b/templates/status.html @@ -59,8 +59,8 @@ - - + + diff --git a/webassets/css/style.css b/webassets/css/style.css index 0b6dcd3..d3ff061 100644 --- a/webassets/css/style.css +++ b/webassets/css/style.css @@ -184,7 +184,7 @@ tr.new td { background-color: var(--bs-success-border-subtle); } 100% { - background-color: intial; + background-color: initial; } } @@ -355,7 +355,7 @@ div.band-spot:hover span.band-spot-info { /* GENERAL MOBILE SUPPORT */ -@media (max-width: 991.99px) { +@media (max-width: 991px) { /* General "hide this on mobile" class */ .hideonmobile { display: none !important;