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:
Chuck
2026-05-14 10:41:55 -04:00
parent b090705b4c
commit 55161f309b
86 changed files with 63 additions and 205 deletions

View File

@@ -1,7 +1,5 @@
import pytest
import time
from unittest.mock import MagicMock, patch, ANY
from src.display_controller import DisplayController
from unittest.mock import MagicMock, patch
class TestDisplayControllerInitialization:
"""Test DisplayController initialization and setup."""
@@ -25,7 +23,6 @@ class TestDisplayControllerInitialization:
# Manually trigger the plugin loading logic that happens in __init__
# Since we're using a fixture that mocks __init__ partially, we need to verify
# the interactions or simulate the loading if we want to test that specific logic
pass
# Note: Testing __init__ logic is tricky with the fixture.
# We rely on the fixture to give us a usable controller.