Fix CI: improve security fix and add link checker configuration

- Fix import order (ast before asyncio)
- Remove NameError from exception handling (ast.literal_eval doesn't raise it)
- Add .lycheeignore to exclude intermittently unavailable star-history API
- Update link-check workflow to exclude star-history API and accept 503 status codes
This commit is contained in:
aakash
2025-11-13 13:05:00 -08:00
parent 930b79cc98
commit abf0b2c676
3 changed files with 9 additions and 4 deletions

View File

@@ -7,10 +7,10 @@ for indexing in LEANN. It supports various Slack MCP server implementations and
flexible message processing options.
"""
import ast
import asyncio
import json
import logging
import ast
from typing import Any, Optional
logger = logging.getLogger(__name__)
@@ -148,7 +148,7 @@ class SlackMCPReader:
if match:
try:
error_dict = ast.literal_eval(match.group(1))
except (ValueError, SyntaxError, NameError):
except (ValueError, SyntaxError):
pass
else:
# Try alternative format
@@ -156,7 +156,7 @@ class SlackMCPReader:
if match:
try:
error_dict = ast.literal_eval(match.group(1))
except (ValueError, SyntaxError, NameError):
except (ValueError, SyntaxError):
pass
if self._is_cache_sync_error(error_dict):