From 698d0698b69d98775be8fca1b8ba0c9964bf40c2 Mon Sep 17 00:00:00 2001 From: Pedro Crespo-Valero <32402063+pcrespov@users.noreply.github.com> Date: Mon, 12 Aug 2024 20:01:34 +0200 Subject: [PATCH] pylint --- .../simcore_service_webserver/catalog/_api.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/services/web/server/src/simcore_service_webserver/catalog/_api.py b/services/web/server/src/simcore_service_webserver/catalog/_api.py index 27efac90e281..b5bffe5a764b 100644 --- a/services/web/server/src/simcore_service_webserver/catalog/_api.py +++ b/services/web/server/src/simcore_service_webserver/catalog/_api.py @@ -302,14 +302,12 @@ async def list_service_outputs( service = await client.get_service( ctx.app, ctx.user_id, service_key, service_version, ctx.product_name ) - - outputs = [] - for output_key in service["outputs"]: - service_output = ServiceOutputGetFactory.from_catalog_service_api_model( - service, output_key, None + return [ + await ServiceOutputGetFactory.from_catalog_service_api_model( + service=service, output_key=output_key, ureg=None ) - outputs.append(service_output) - return outputs + for output_key in service["outputs"] + ] async def get_service_output( @@ -321,12 +319,10 @@ async def get_service_output( service = await client.get_service( ctx.app, ctx.user_id, service_key, service_version, ctx.product_name ) - service_output: ServiceOutputGet = ( - ServiceOutputGetFactory.from_catalog_service_api_model(service, output_key) + return await ServiceOutputGetFactory.from_catalog_service_api_model( + service=service, output_key=output_key ) - return service_output - async def get_compatible_outputs_given_target_input( service_key: ServiceKey,