Improve loops and lists (#113269)

* Enable PERF

* Enable PERF rule

* Enable PERF rule

* Don't enable flag yet
This commit is contained in:
Joost Lekkerkerker 2024-03-14 10:22:20 +01:00 committed by GitHub
parent 8a98fb7cfd
commit 05172d8e4d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 125 additions and 172 deletions

View file

@ -16,13 +16,13 @@ def generate_and_validate(integrations: dict[str, Integration]) -> str:
if not match_types:
continue
for entry in match_types:
match_list.append(
{
"domain": domain,
**{k: v for k, v in entry.items() if k != "known_devices"},
}
)
match_list.extend(
{
"domain": domain,
**{k: v for k, v in entry.items() if k != "known_devices"},
}
for entry in match_types
)
return format_python_namespace({"USB": match_list})