diff --git a/src/scanspec/core.py b/src/scanspec/core.py index cd39fb1c..f071720c 100644 --- a/src/scanspec/core.py +++ b/src/scanspec/core.py @@ -337,9 +337,9 @@ def concat(self, other: Frames[Axis], gap: bool = False) -> Frames[Axis]: {'x': array([1, 2, 3, 4, 5, 6]), 'y': array([6, 5, 4, 3, 2, 1])} """ - assert set(self.axes()) == set( - other.axes() - ), f"axes {self.axes()} != {other.axes()}" + assert set(self.axes()) == set(other.axes()), ( + f"axes {self.axes()} != {other.axes()}" + ) def concat_dict(ds: Sequence[AxesPoints[Axis]]) -> AxesPoints[Axis]: # Concat each array in midpoints, lower, upper. E.g. diff --git a/src/scanspec/specs.py b/src/scanspec/specs.py index 5a7807e9..3f4bd0c8 100644 --- a/src/scanspec/specs.py +++ b/src/scanspec/specs.py @@ -234,9 +234,9 @@ def calculate( # noqa: D102 ) -> list[Frames[Axis]]: frames_left = self.left.calculate(bounds, nested) frames_right = self.right.calculate(bounds, nested) - assert len(frames_left) >= len( - frames_right - ), f"Zip requires len({self.left}) >= len({self.right})" + assert len(frames_left) >= len(frames_right), ( + f"Zip requires len({self.left}) >= len({self.right})" + ) # Pad and expand the right to be the same size as left. Special case, if # only one Frames object with size 1, expand to the right size @@ -262,9 +262,9 @@ def calculate( # noqa: D102 combined = left else: combined = left.zip(right) - assert isinstance( - combined, Frames - ), f"Padding went wrong {frames_left} {padded_right}" + assert isinstance(combined, Frames), ( + f"Padding went wrong {frames_left} {padded_right}" + ) frames.append(combined) return frames