Skip to content

Commit

Permalink
fix: remove __len__ + update test
Browse files Browse the repository at this point in the history
  • Loading branch information
fdrgsp committed Sep 1, 2023
1 parent d0a3b7a commit 90b05ea
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/useq/_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 90b05ea

Please sign in to comment.