1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-02 11:22:24 +01:00

[ruff] Enable PERF rules and fix all violations (#9874)

This commit is contained in:
J. Nick Koston
2025-07-25 08:15:54 -10:00
committed by GitHub
parent 88ccde4ba1
commit f808c38f10
18 changed files with 90 additions and 96 deletions

View File

@@ -23,9 +23,7 @@ async def test_host_mode_fan_preset(
entities = await client.list_entities_services()
fans: list[FanInfo] = []
for entity_list in entities:
for entity in entity_list:
if isinstance(entity, FanInfo):
fans.append(entity)
fans.extend(entity for entity in entity_list if isinstance(entity, FanInfo))
# Create a map of fan names to entity info
fan_map = {fan.name: fan for fan in fans}