Skip to content

Commit

Permalink
Re-format src to appease ruff linting
Browse files Browse the repository at this point in the history
  • Loading branch information
tpoliaw committed Jan 24, 2025
1 parent 52c000f commit 8775f04
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/scanspec/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
12 changes: 6 additions & 6 deletions src/scanspec/specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit 8775f04

Please sign in to comment.