From 76384165cda2a36a3a7cea2fa8dbc21cbfe13cb1 Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Sat, 9 Apr 2022 20:39:00 +0200 Subject: [PATCH] Use Python 3 style super() which is simpler and less fragile. --- boxes/generators/agricolainsert.py | 10 +++++----- boxes/generators/dinrailbox.py | 2 +- boxes/generators/dividertray.py | 4 ++-- boxes/generators/phoneholder.py | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/boxes/generators/agricolainsert.py b/boxes/generators/agricolainsert.py index 160826e..ec5bdb7 100644 --- a/boxes/generators/agricolainsert.py +++ b/boxes/generators/agricolainsert.py @@ -781,7 +781,7 @@ class MoorBoxSideEdge(edges.BaseEdge): """ def __init__(self, boxes, corner_length, corner_height, lower_corner): - super(MoorBoxSideEdge, self).__init__(boxes, None) + super().__init__(boxes, None) self.corner_height = corner_height self.lower_corner = lower_corner self.corner_length = corner_length @@ -812,7 +812,7 @@ class MoorBoxHoleEdge(edges.BaseEdge): """ def __init__(self, boxes, height, corner_height, lower_corner): - super(MoorBoxHoleEdge, self).__init__(boxes, None) + super().__init__(boxes, None) self.height = height self.corner_height = corner_height self.lower_corner = lower_corner @@ -864,7 +864,7 @@ class BedHeadEdge(edges.BaseEdge): """ def __init__(self, boxes, hole_depth): - super(BedHeadEdge, self).__init__(boxes, None) + super().__init__(boxes, None) self.hole_depth = hole_depth def __call__(self, length, **kw): @@ -895,7 +895,7 @@ class Bed2SidesEdge(edges.BaseEdge): """ def __init__(self, boxes, bed_length, full_head_length, full_foot_height): - super(Bed2SidesEdge, self).__init__(boxes, None) + super().__init__(boxes, None) self.bed_length = bed_length self.full_head_length = full_head_length self.full_foot_height = full_foot_height @@ -927,7 +927,7 @@ class NoopEdge(edges.BaseEdge): """ def __init__(self, boxes): - super(NoopEdge, self).__init__(boxes, None) + super().__init__(boxes, None) def __call__(self, length, **kw): # cancel turn diff --git a/boxes/generators/dinrailbox.py b/boxes/generators/dinrailbox.py index 71cd8d0..db1cf8c 100644 --- a/boxes/generators/dinrailbox.py +++ b/boxes/generators/dinrailbox.py @@ -20,7 +20,7 @@ from boxes import * class DinRailEdge(edges.FingerHoleEdge): def __init__(self, boxes, settings, width=35.0, offset=0.0): - super(DinRailEdge, self).__init__(boxes, settings) + super().__init__(boxes, settings) self.width = width self.offset = offset diff --git a/boxes/generators/dividertray.py b/boxes/generators/dividertray.py index 3498ebf..968c0ad 100644 --- a/boxes/generators/dividertray.py +++ b/boxes/generators/dividertray.py @@ -533,7 +533,7 @@ class DividerNotchesEdge(edges.BaseEdge): def __init__(self, boxes, sx): - super(DividerNotchesEdge, self).__init__(boxes, None) + super().__init__(boxes, None) self.sx = sx @@ -578,7 +578,7 @@ class DividerSlotsEdge(edges.BaseEdge): def __init__(self, boxes, descriptions): - super(DividerSlotsEdge, self).__init__(boxes, None) + super().__init__(boxes, None) self.descriptions = descriptions diff --git a/boxes/generators/phoneholder.py b/boxes/generators/phoneholder.py index 31e7ac3..5427f47 100644 --- a/boxes/generators/phoneholder.py +++ b/boxes/generators/phoneholder.py @@ -214,7 +214,7 @@ class PhoneHolder(Boxes): class BottomEdge(edges.BaseEdge): def __init__(self, boxes, support_start_height, support_spacing): - super(BottomEdge, self).__init__(boxes, None) + super().__init__(boxes, None) self.support_start_height = support_start_height self.support_spacing = support_spacing @@ -242,7 +242,7 @@ class BottomEdge(edges.BaseEdge): class SideEdge(edges.BaseEdge): def __init__(self, boxes, tab_start, tab_length, reverse=False): - super(SideEdge, self).__init__(boxes, None) + super().__init__(boxes, None) self.tab_start = tab_start self.tab_length = tab_length self.reverse = reverse @@ -271,7 +271,7 @@ class SideEdge(edges.BaseEdge): class TabbedEdge(edges.BaseEdge): def __init__(self, boxes, tab_start, tab_length, tab_depth, reverse=False): - super(TabbedEdge, self).__init__(boxes, None) + super().__init__(boxes, None) self.tab_start = tab_start self.tab_length = tab_length self.tab_depth = tab_depth