mirror of
https://github.com/esphome/esphome.git
synced 2025-10-29 22:24:26 +00:00
[ruff] Enable SIM rules and fix code simplification violations (#9872)
This commit is contained in:
@@ -526,7 +526,7 @@ def validate_effects(allowed_effects):
|
||||
errors = []
|
||||
names = set()
|
||||
for i, x in enumerate(value):
|
||||
key = next(it for it in x.keys())
|
||||
key = next(it for it in x)
|
||||
if key not in allowed_effects:
|
||||
errors.append(
|
||||
cv.Invalid(
|
||||
|
||||
Reference in New Issue
Block a user