mirror of
https://github.com/home-assistant/core.git
synced 2025-11-08 02:19:31 +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
@@ -175,8 +175,7 @@ class HomeAssistantView:
|
||||
|
||||
handler = request_handler_factory(hass, self, handler)
|
||||
|
||||
for url in urls:
|
||||
routes.append(router.add_route(method, url, handler))
|
||||
routes.extend(router.add_route(method, url, handler) for url in urls)
|
||||
|
||||
# Use `get` because CORS middleware is not be loaded in emulated_hue
|
||||
if self.cors_allowed:
|
||||
|
||||
Reference in New Issue
Block a user