mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-05-16 18:23:32 +00:00
fix: remove unused imports and bare exception aliases (pyflakes F401/F841)
Remove unused imports across 86 files in src/, web_interface/, test/, and scripts/ using autoflake. No logic changes — only dead import statements and unused names in from-imports are removed. Also remove bare exception aliases where the variable is never referenced in the handler body: - src/cache/disk_cache.py: except (IOError, OSError, PermissionError) as e - src/cache_manager.py: except (OSError, IOError, PermissionError) as perm_error - src/plugin_system/resource_monitor.py: except Exception as e - web_interface/app.py: except Exception as read_err 86 files changed, 205 lines removed, 18 pre-existing test failures unchanged. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from flask import Blueprint, request, jsonify, Response, send_from_directory
|
||||
from flask import Blueprint, request, jsonify, Response
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
@@ -17,10 +17,8 @@ logger = logging.getLogger(__name__)
|
||||
from src.web_interface.api_helpers import success_response, error_response, validate_request_json
|
||||
from src.web_interface.errors import ErrorCode
|
||||
from src.plugin_system.operation_types import OperationType
|
||||
from src.web_interface.logging_config import log_plugin_operation, log_config_change
|
||||
from src.web_interface.validators import (
|
||||
validate_image_url, validate_file_upload, validate_mime_type,
|
||||
validate_numeric_range, validate_string_length, sanitize_plugin_config
|
||||
validate_file_upload
|
||||
)
|
||||
from src.error_aggregator import get_error_aggregator
|
||||
|
||||
@@ -4137,7 +4135,6 @@ def save_plugin_config():
|
||||
current_value = array_value # Update for length check below
|
||||
except (ValueError, KeyError, TypeError) as e:
|
||||
logger.debug(f"Failed to convert {prop_key} to array: {e}")
|
||||
pass
|
||||
|
||||
# If it's an array, ensure correct types and check minItems
|
||||
if isinstance(current_value, list):
|
||||
|
||||
Reference in New Issue
Block a user