From 90b05ea54c5d9fac9d189d4eda7019c61e784ef0 Mon Sep 17 00:00:00 2001 From: fdrgsp Date: Fri, 1 Sep 2023 14:49:50 -0400 Subject: [PATCH] fix: remove __len__ + update test --- src/useq/_grid.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/useq/_grid.py b/src/useq/_grid.py index 67917199..7b86876b 100644 --- a/src/useq/_grid.py +++ b/src/useq/_grid.py @@ -419,11 +419,8 @@ def __iter__(self) -> Iterator[GridPosition]: # type: ignore ): yield GridPosition(x, y, 0, 0, True) - def __len__(self) -> int: - return self.num_positions() - def num_positions(self) -> int: - return len(list(self.__iter__())) + return self.num_points def _random_points_in_ellipse(