mirror of
https://github.com/home-assistant/core.git
synced 2025-12-20 10:59:24 +00:00
Improve loops and lists (#113269)
* Enable PERF * Enable PERF rule * Enable PERF rule * Don't enable flag yet
This commit is contained in:
committed by
GitHub
parent
8a98fb7cfd
commit
05172d8e4d
@@ -16,8 +16,7 @@ def generate_and_validate(integrations: dict[str, Integration]) -> str:
|
||||
if not match_types:
|
||||
continue
|
||||
|
||||
for entry in match_types:
|
||||
match_list.append({"domain": domain, **entry})
|
||||
match_list.extend({"domain": domain, **entry} for entry in match_types)
|
||||
|
||||
return format_python_namespace(
|
||||
{"DHCP": match_list},
|
||||
|
||||
Reference in New Issue
Block a user