Remove dead code
- wire.with_figure: the device uses dataclasses.replace directly. - DeviceConnected/DeviceDisconnected: emitted, never subscribed to, and a duplicate of ConnectionChanged(target="firmware"). - ScreenService.toggle(): never called. - GET /api/lirc (LircConfigOut, api.lircConfig): no front-end reads it. - POST /api/volume's delta_percent (api.nudgeVolume): no front-end sends it. - LibraryCache.shrink_stored_covers: a one-off migration that re-read every cover header on every scan. _INDEX_VERSION 7 rebuilds any cache that could still need it. - Firmware: the MFRC522 library and its unused globals (lib/nfc/rc522.c is the driver in use), and mfrc_version.h, a reader test sketch nothing included. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -288,24 +288,6 @@ async def test_volume_scales_across_the_allowed_range(client: Client, sim: Simul
|
||||
assert (await client.get("/api/state")).json()["volume"] == 50
|
||||
|
||||
|
||||
async def test_volume_steps_are_relative_to_the_percentage(client: Client, sim: Simulation) -> None:
|
||||
await client.post("/api/volume", json={"percent": 50})
|
||||
await sim.bus.drain()
|
||||
await client.post("/api/volume", json={"delta_percent": 10})
|
||||
await sim.bus.drain()
|
||||
|
||||
assert (await client.get("/api/state")).json()["volume"] == 60
|
||||
assert sim.player.volume == 36
|
||||
|
||||
|
||||
async def test_volume_steps_clamp_at_the_ends(client: Client, sim: Simulation) -> None:
|
||||
await client.post("/api/volume", json={"percent": 95})
|
||||
await sim.bus.drain()
|
||||
await client.post("/api/volume", json={"delta_percent": 20})
|
||||
await sim.bus.drain()
|
||||
assert (await client.get("/api/state")).json()["volume"] == 100
|
||||
|
||||
|
||||
async def test_remote_steps_move_by_the_volume_increment(client: Client, sim: Simulation) -> None:
|
||||
"""The +/- buttons take the IR remote's step, in device units, not a percentage."""
|
||||
await client.post("/api/volume", json={"percent": 50})
|
||||
|
||||
Reference in New Issue
Block a user