From dd776f0338e44c778347f7f65d5c3573cef004bd Mon Sep 17 00:00:00 2001 From: Stanislaw Malinowski Date: Thu, 14 Mar 2024 08:26:28 +0000 Subject: [PATCH] fix flake8 problems in cli.py --- src/blueapi/cli/cli.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/blueapi/cli/cli.py b/src/blueapi/cli/cli.py index 0a19b5c35..8d3b61648 100644 --- a/src/blueapi/cli/cli.py +++ b/src/blueapi/cli/cli.py @@ -193,13 +193,16 @@ def store_finished_event(event: WorkerEvent) -> None: print("Plan params validation successful:", validated_data) except ValidationError as e: errors = e.errors() - formatted_errors = "; ".join([f"{err['loc'][0]}: {err['msg']}" for err in errors]) - + formatted_errors = "; ".join( + [f"{err['loc'][0]}: {err['msg']}" for err in errors] + ) + print(f"Input validation failed: {formatted_errors}") # Handle the case where the parameters are invalid according to the PlanModel - expected_params = schema.parameter_schema.get('properties') + expected_params = schema.parameter_schema.get("properties") print( - f"""failed to run the {name} plan, supplied params {parameters} do not match the expected params: {expected_params}""" + f"""failed to run the {name} plan, supplied params {parameters} + do not match the expected params: {expected_params}""" ) return