github Lexonight1/thermalright-trcc-linux v6.2.4

latest releases: v9.4.7, v9.4.6, v9.4.5...
one month ago

DRY Refactoring — Eliminate 3 Code Duplications

-110 lines, +245 lines (net -50 lines of duplicated logic, +28 tests)

Changes

  • parse_hex_color()core/models.py — single source of truth for hex color parsing, previously duplicated in CLI and 2 API modules
  • dispatch_result()api/models.py — unified API response helper stripping non-serializable keys, previously duplicated in api/display and api/led
  • ImageService.encode_for_device()services/image.py — Strategy pattern for JPEG vs RGB565 encoding, previously duplicated in services/device and services/display
  • Clean stale .gitignore entries
  • 28 new tests with pytest fixtures
  • 2509 tests passing, ruff clean, pyright 0 errors

Files Changed

16 files across 4 layers: core/, services/, api/, cli/, plus 3 test files

Don't miss a new thermalright-trcc-linux release

NewReleases is sending notifications on new releases.