File tree Expand file tree Collapse file tree
src/frequenz/client/assets Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -227,7 +227,7 @@ async def list_microgrid_electrical_component_connections(
227227 destination_component_ids : Iterable [ElectricalComponentId ] = (),
228228 * ,
229229 raise_on_errors : bool = False ,
230- ) -> list [ComponentConnection | None ]:
230+ ) -> list [ComponentConnection ]:
231231 """
232232 Get the electrical component connections of a microgrid.
233233
@@ -290,11 +290,13 @@ async def list_microgrid_electrical_component_connections(
290290 f"{ len (exceptions )} connection(s) failed validation" ,
291291 exceptions ,
292292 )
293- return valid_connections # type: ignore[return-value]
293+ return valid_connections
294294
295- return list (
296- map (
295+ return [
296+ c
297+ for c in map (
297298 component_connection_from_proto ,
298299 filter (bool , response .connections ),
299300 )
300- )
301+ if c is not None
302+ ]
You can’t perform that action at this time.
0 commit comments