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

@@ -29,13 +29,14 @@ cleanup_timer = None
run = True
def shutdown(sig, frame):
def shutdown(_signum=None, _frame=None):
"""Shutdown function"""
global run
logging.info("Stopping program...")
web_server.stop()
if web_server:
web_server.stop()
for sp in spot_providers:
if sp.enabled:
sp.stop()
@@ -45,8 +46,10 @@ def shutdown(sig, frame):
for scp in solar_condition_providers:
if scp.enabled:
scp.stop()
cleanup_timer.stop()
lookup_helper.stop()
if cleanup_timer:
cleanup_timer.stop()
if lookup_helper:
lookup_helper.stop()
spots.close()
alerts.close()
solar_conditions_cache.close()