Skip to content

Commit 71a1031

Browse files
Update shapes_abc.py
1 parent 7664323 commit 71a1031

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

python-sequences/shapes_abc.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ class ShapePoints(MutableSequence):
77
def __init__(self, points):
88
self.points = list(points)
99
if len(self.points) < self.MIN_POINTS:
10-
raise ValueError(f"Shape must have at least {self.MIN_POINTS} points")
10+
raise ValueError(
11+
f"Shape must have at least {self.MIN_POINTS} points"
12+
)
1113
if points and self.points[0] != self.points[-1]:
1214
self.points.append(self.points[0])
1315

@@ -31,7 +33,9 @@ def __contains__(self, item):
3133

3234
def __delitem__(self, index):
3335
if len(self) < self.MIN_POINTS + 1:
34-
raise ValueError(f"Shape must have at least {self.MIN_POINTS} points")
36+
raise ValueError(
37+
f"Shape must have at least {self.MIN_POINTS} points"
38+
)
3539
if index in (0, len(self.points) - 1, -1):
3640
del self.points[0]
3741
self.points[-1] = self.points[0]

0 commit comments

Comments
 (0)