Skip to content

Commit 217439b

Browse files
authored
Merge pull request #291 from kevinhu/kevinhu-patch-1
Improve typing for `PolygonBox.bbox`
2 parents beb57e0 + df64d18 commit 217439b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

surya/common/polygon.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ def area(self):
4747
return self.width * self.height
4848

4949
@computed_field
50+
@property
5051
def bbox(self) -> List[float]:
5152
x_coords = [point[0] for point in self.polygon]
5253
y_coords = [point[1] for point in self.polygon]
@@ -131,4 +132,4 @@ def shift(self, x_shift: float | None = None, y_shift: float | None = None):
131132
corner[0] += x_shift
132133
if y_shift is not None:
133134
for corner in self.polygon:
134-
corner[1] += y_shift
135+
corner[1] += y_shift

0 commit comments

Comments
 (0)