Skip to content

Commit e29b780

Browse files
style(pre-commit.ci): auto fixes [...]
1 parent 3ad1742 commit e29b780

3 files changed

Lines changed: 6 additions & 7 deletions

File tree

src/useq/_iter_sequence.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,7 @@ def _iter_sequence(
175175
event_kwargs.update(_xyzpos(position, channel, sequence.z_plan, grid, z_pos))
176176
if position and position.name:
177177
pos_name = position.name
178-
if (
179-
grid
180-
and grid.name
181-
and getattr(position, "plate_row", None) is not None
182-
):
178+
if grid and grid.name and getattr(position, "plate_row", None) is not None:
183179
pos_name = f"{pos_name}_{grid.name}"
184180
event_kwargs["pos_name"] = pos_name
185181
# include position properties only when p-index changes

src/useq/_plate.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,6 @@ def plot(self, show_axis: bool = True) -> None:
418418
plot_plate(self, show_axis=show_axis)
419419

420420

421-
422421
def _find_pattern(seq: Sequence[int]) -> tuple[list[int] | None, int | None]:
423422
n = len(seq)
424423

src/useq/_position.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,11 @@ def __round__(self, ndigits: "SupportsIndex | None" = None) -> "Self":
9999
@model_validator(mode="after")
100100
def _name_from_plate(self) -> "Self":
101101
"""Auto-generate name from plate_row/plate_col if not provided."""
102-
if self.name is None and self.plate_row is not None and self.plate_col is not None:
102+
if (
103+
self.name is None
104+
and self.plate_row is not None
105+
and self.plate_col is not None
106+
):
103107
name = f"{_index_to_row_name(self.plate_row)}{self.plate_col + 1}"
104108
object.__setattr__(self, "name", name)
105109
return self

0 commit comments

Comments
 (0)