Skip to content

Commit

Permalink
Fix precommit issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiggi committed Dec 8, 2023
1 parent 3563b7a commit 47e2004
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pyresample/boundary/boundary_sides.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

class BoundarySides:
"""A class to represent the sides of an area boundary.
The sides are stored as a tuple of 4 numpy arrays, each representing the
coordinate (geographic or projected) of the vertices of the boundary side.
The sides must be stored in the order (top, right, left, bottom),
Expand Down Expand Up @@ -69,6 +70,7 @@ def left(self):
@property
def vertices(self):
"""Return the vertices of the concatenated sides.
Note that the last element of each side is discarded to avoid duplicates.
"""
return np.concatenate([side[:-1] for side in self._sides])
Expand All @@ -81,4 +83,4 @@ def __getitem__(self, index):
"""Return the side at the given index."""
if not isinstance(index, int) or not 0 <= index < 4:
raise IndexError("Index must be an integer from 0 to 3.")
return self._sides[index]
return self._sides[index]
2 changes: 1 addition & 1 deletion pyresample/test/test_boundary/test_boundary_sides.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,4 @@ def test_indexing_invalid(self):
np.array([7, 8, 1])] # left
boundary = BoundarySides(sides)
with pytest.raises(IndexError):
boundary[4] # Invalid index
boundary[4] # Invalid index

0 comments on commit 47e2004

Please sign in to comment.