mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Switch genexp to listcomp in async_progress_by_init_data_type (#126405)
Since listcomps are inlined in python 3.12+, the listcomp will be a bit faster. Additionally we always iterate everything here so there is no reason to use a genexpr
This commit is contained in:
parent
d8e9d1c16e
commit
af2798f063
@ -296,11 +296,11 @@ class FlowManager(abc.ABC, Generic[_FlowResultT, _HandlerT]):
|
||||
) -> list[_FlowResultT]:
|
||||
"""Return flows in progress init matching by data type as a partial FlowResult."""
|
||||
return self._async_flow_handler_to_flow_result(
|
||||
(
|
||||
[
|
||||
progress
|
||||
for progress in self._init_data_process_index.get(init_data_type, ())
|
||||
if matcher(progress.init_data)
|
||||
),
|
||||
],
|
||||
include_uninitialized,
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user