Skip to content

Commit

Permalink
fix flake8 problems in cli.py
Browse files Browse the repository at this point in the history
  • Loading branch information
stan-dot committed Mar 14, 2024
1 parent afeae39 commit dd776f0
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/blueapi/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit dd776f0

Please sign in to comment.