From 081298a883b914a6a5c00450a733e2b2b7acb24a Mon Sep 17 00:00:00 2001 From: Eduardo Rios Date: Tue, 15 Sep 2026 14:51:51 -0300 Subject: [PATCH] fix: annotate already_added_keys to satisfy mypy The parameter-level annotation on _check_keys_and_notif_id alone wasn't enough -- mypy needs the type at the empty list's declaration site inside filter_notification_alerts. Also reformatted the helper's now-longer signature to satisfy ruff. Co-Authored-By: Claude Sonnet 5 --- orchestrator/activities/slot_manager.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/orchestrator/activities/slot_manager.py b/orchestrator/activities/slot_manager.py index 683813c..395f094 100644 --- a/orchestrator/activities/slot_manager.py +++ b/orchestrator/activities/slot_manager.py @@ -420,7 +420,7 @@ class SlotManager(SientiaMonitoring): receiver_groups[group_name] = {**receiver_group, 'notifications': []} receiver_groups[group_name]['notifications'] = [] - already_added_keys = [] + already_added_keys: list[str] = [] ignore_list = receiver_group.get('ignore', []) levels_list = receiver_group.get('levels') @@ -486,7 +486,9 @@ class SlotManager(SientiaMonitoring): return level_check and model_id_check @staticmethod - def _check_keys_and_notif_id(notification_id, ignore_list, key, already_added_keys) -> bool: + def _check_keys_and_notif_id( + notification_id, ignore_list, key, already_added_keys: list[str] + ) -> bool: """ Check if the key has already been added to the list of already added keys.