Skip to content

Commit ca60cbe

Browse files
allenporterCopilot
andauthored
chore: Update tests/devices/traits/v1/fixtures.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 8c618ca commit ca60cbe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/devices/traits/v1/fixtures.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ def mock_app_get_init_status_fixture(device_info: HomeDataDevice, products: list
115115
Uses real device feature data from device_info.yaml when available for the
116116
product model, falling back to the default mock data otherwise.
117117
"""
118-
product = next(filter(lambda product: product.id == device_info.product_id, products))
119-
if not product:
118+
product = next((product for product in products if product.id == device_info.product_id), None)
119+
if product is None:
120120
raise ValueError(f"Product {device_info.product_id} not found")
121121
device_info_data = mock_data.DEVICE_INFO.get(product.model, {})
122122
return {

0 commit comments

Comments
 (0)