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 @@ -267,7 +267,7 @@ async def list_microgrid_electrical_component_connections(
267267 )
268268
269269 if raise_on_errors :
270- connections : list [ComponentConnection | None ] = []
270+ valid_connections : list [ComponentConnection ] = []
271271 exceptions : list [InvalidConnectionError ] = []
272272 for conn_pb in filter (bool , response .connections ):
273273 major_issues : list [str ] = []
@@ -284,13 +284,13 @@ async def list_microgrid_electrical_component_connections(
284284 )
285285 )
286286 elif connection is not None :
287- connections .append (connection )
287+ valid_connections .append (connection )
288288 if exceptions :
289289 raise InvalidConnectionErrorGroup (
290- valid_connections = [ c for c in connections if c is not None ] ,
290+ valid_connections = valid_connections ,
291291 exceptions = exceptions ,
292292 )
293- return connections
293+ return valid_connections # type: ignore[return-value]
294294
295295 return list (
296296 map (
You can’t perform that action at this time.
0 commit comments