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 4040"""The default timeout for gRPC calls made by this client (in seconds)."""
4141
4242
43- class AssetsApiClient (
44- BaseApiClient [assets_pb2_grpc .PlatformAssetsStub ]
45- ): # pylint: disable=too-many-arguments
43+ class AssetsApiClient (BaseApiClient [assets_pb2_grpc .PlatformAssetsStub ]): # pylint: disable=too-many-arguments
4644 """A client for the Assets API."""
4745
4846 def __init__ (
@@ -227,7 +225,7 @@ async def list_microgrid_electrical_component_connections(
227225 destination_component_ids : Iterable [ElectricalComponentId ] = (),
228226 * ,
229227 raise_on_errors : bool = False ,
230- ) -> list [ComponentConnection | None ]:
228+ ) -> list [ComponentConnection ]:
231229 """
232230 Get the electrical component connections of a microgrid.
233231
@@ -290,11 +288,13 @@ async def list_microgrid_electrical_component_connections(
290288 f"{ len (exceptions )} connection(s) failed validation" ,
291289 exceptions ,
292290 )
293- return valid_connections # type: ignore[return-value]
291+ return valid_connections
294292
295- return list (
296- map (
293+ return [
294+ c
295+ for c in map (
297296 component_connection_from_proto ,
298297 filter (bool , response .connections ),
299298 )
300- )
299+ if c is not None
300+ ]
You can’t perform that action at this time.
0 commit comments