--- a/printrun-src/printrun/packer.py Tue Jan 19 20:45:09 2021 +0100 +++ b/printrun-src/printrun/packer.py Wed Jan 20 10:15:13 2021 +0100 @@ -23,7 +23,7 @@ import Polygon.Utils -class Vector2(object): +class Vector2: """Simple 2d vector / point class.""" def __init__(self, x=0, y=0): @@ -60,7 +60,7 @@ ) -class Rect(object): +class Rect: """Simple rectangle object.""" def __init__(self, width, height, data={}): self.width = width @@ -110,7 +110,7 @@ return self.width * self.height -class PointList(object): +class PointList: """Methods for transforming a list of points.""" def __init__(self, points=[]): self.points = points @@ -142,7 +142,7 @@ return segs -class LineSegment(object): +class LineSegment: def __init__(self, start, end): self.start = start self.end = end @@ -177,7 +177,7 @@ return closest_point.distance(point) -class Packer(object): +class Packer: def __init__(self): self._rects = []