Cleaning up workflows and fixing tests.
This commit is contained in:
parent
86fa48fb9b
commit
351a66a42c
2 changed files with 37 additions and 19 deletions
|
|
@ -318,9 +318,9 @@ class RectGridPlanner(ScanPlanner):
|
|||
def _parse(self, planner_settings: Optional[dict] = None) -> None:
|
||||
expected_keys = ["dx", "dy"]
|
||||
invalid_msg = "RectGridPlanner requires planner_settings with keys: "
|
||||
if not planner_settings:
|
||||
raise ValueError(invalid_msg + ",".join(expected_keys))
|
||||
if not all(k in planner_settings for k in expected_keys):
|
||||
if not planner_settings or not all(
|
||||
k in planner_settings for k in expected_keys
|
||||
):
|
||||
raise KeyError(invalid_msg + ",".join(expected_keys))
|
||||
|
||||
self._dx = int(planner_settings["dx"])
|
||||
|
|
@ -623,7 +623,7 @@ class RegularGridPlanner(RectGridPlanner):
|
|||
super()._parse(planner_settings)
|
||||
|
||||
expected_keys = ["x_count", "y_count", "style"]
|
||||
invalid_msg = "SnakeScan requires planner_settings with keys: "
|
||||
invalid_msg = "RegularGrid requires planner_settings with keys: "
|
||||
if not planner_settings or not all(
|
||||
k in planner_settings for k in expected_keys
|
||||
):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue