mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-05-15 10:03:31 +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>
29 lines
868 B
Python
29 lines
868 B
Python
#!/usr/bin/env python3
|
|
"""
|
|
Check what imports are actually in the app.py file on the Pi
|
|
"""
|
|
|
|
from pathlib import Path
|
|
|
|
# Read the app.py file and check the import lines
|
|
app_py_path = Path.home() / 'LEDMatrix' / 'web_interface' / 'app.py'
|
|
|
|
print(f"🔍 Checking imports in: {app_py_path}")
|
|
print(f"📁 File exists: {app_py_path.exists()}")
|
|
|
|
if app_py_path.exists():
|
|
with open(app_py_path, 'r') as f:
|
|
lines = f.readlines()
|
|
|
|
print("\n🔍 Import lines in app.py:")
|
|
for i, line in enumerate(lines, 1):
|
|
if 'from' in line and 'blueprints' in line and 'import' in line:
|
|
print(f" Line {i}: {line.strip()}")
|
|
|
|
print("\n🔍 Blueprint registration lines:")
|
|
for i, line in enumerate(lines, 1):
|
|
if 'register_blueprint' in line:
|
|
print(f" Line {i}: {line.strip()}")
|
|
else:
|
|
print("❌ app.py file not found!")
|