Skip to content

Commit

Permalink
fix: WellPlatePlan.__iter__ return annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 committed Oct 4, 2024
1 parent caf04a4 commit 79a99d7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/useq/_plate.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
TYPE_CHECKING,
Any,
Iterable,
Iterator,
List,
Sequence,
Tuple,
Expand All @@ -22,7 +23,6 @@
field_validator,
model_validator,
)
from typing_extensions import Annotated

from useq._base_model import FrozenModel, UseqModel
from useq._grid import RandomPoints, RelativeMultiPointPlan, Shape
Expand All @@ -31,6 +31,7 @@

if TYPE_CHECKING:
from pydantic_core import core_schema
from typing_extensions import Annotated

Index = Union[int, List[int], slice]
IndexExpression = Union[Tuple[Index, ...], Index]
Expand Down Expand Up @@ -261,7 +262,7 @@ def rotation_matrix(self) -> np.ndarray:
rads = np.radians(self.rotation)
return np.array([[np.cos(rads), np.sin(rads)], [-np.sin(rads), np.cos(rads)]])

def __iter__(self) -> Iterable[Position]: # type: ignore
def __iter__(self) -> Iterator[Position]: # type: ignore
"""Iterate over the selected positions."""
yield from self.image_positions

Expand Down

0 comments on commit 79a99d7

Please sign in to comment.