mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-05-15 18:03:32 +00:00
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>
Utility Scripts
This directory contains utility scripts for maintenance and system operations.
Scripts
clear_cache.py- Clears LEDMatrix cache data (specific keys or all cache)start_web_conditionally.py- Conditionally starts the web interface based on config settingswifi_monitor_daemon.py- Background daemon that monitors WiFi/Ethernet connection and manages access point modecleanup_venv.sh- Cleans up Python virtual environment filesclear_python_cache.sh- Clears Python cache files (pycache, *.pyc, etc.)
Usage
Clear Cache
python3 scripts/utils/clear_cache.py --list # List cache keys
python3 scripts/utils/clear_cache.py --clear-all # Clear all cache
python3 scripts/utils/clear_cache.py --clear <key> # Clear specific key
Start Web Interface Conditionally
This script is typically called by the systemd service (ledmatrix-web.service) and checks the web_display_autostart setting in config/config.json before starting the web interface.
WiFi Monitor Daemon
This daemon is typically run as a systemd service (ledmatrix-wifi-monitor.service) and automatically manages WiFi access point mode based on network connectivity.