Load notifications from the JSON file.
()
| 216 | # ───────────────────────────── |
| 217 | |
| 218 | def load_developer_notifications() -> list[dict]: |
| 219 | """Load notifications from the JSON file.""" |
| 220 | if not NOTIFICATIONS_FILE.exists(): |
| 221 | logger.warning(f"Developer notifications file not found: {NOTIFICATIONS_FILE}") |
| 222 | return [] |
| 223 | |
| 224 | try: |
| 225 | with open(NOTIFICATIONS_FILE, 'r', encoding='utf-8') as f: |
| 226 | data = json.load(f) |
| 227 | return data.get('notifications', []) |
| 228 | except json.JSONDecodeError as e: |
| 229 | logger.error(f"Error parsing developer notifications JSON: {e}") |
| 230 | return [] |
| 231 | except Exception as e: |
| 232 | logger.error(f"Error loading developer notifications: {e}") |
| 233 | return [] |
| 234 | |
| 235 | |
| 236 | def sync_developer_notifications() -> dict[str, int]: |
no test coverage detected