diff --git a/boxes/__init__.py b/boxes/__init__.py index 0202c74..a7ded43 100755 --- a/boxes/__init__.py +++ b/boxes/__init__.py @@ -119,7 +119,7 @@ class NutHole: "M64": (95, 51), } - def __init__(self, boxes, settings): + def __init__(self, boxes, settings) -> None: self.boxes = boxes self.ctx = boxes.ctx self.settings = settings @@ -181,7 +181,7 @@ class ArgparseEdgeType: names = edges.getDescriptions() edges: List[str] = [] - def __init__(self, edges: Optional[str] = None): + def __init__(self, edges: Optional[str] = None) -> None: if edges: self.edges = list(edges) @@ -284,7 +284,7 @@ class Boxes: description = "" # Markdown syntax is supported - def __init__(self): + def __init__(self) -> None: self.formats = formats.Formats() self.ctx = None description = self.__doc__ diff --git a/boxes/drawing.py b/boxes/drawing.py index e8c1203..0c57b5a 100644 --- a/boxes/drawing.py +++ b/boxes/drawing.py @@ -27,7 +27,7 @@ class Surface: scale = 1.0 invert_y = False - def __init__(self, fname): + def __init__(self, fname) -> None: self._fname = fname self.parts = [] self._p = self.new_part("default") @@ -93,7 +93,7 @@ class Surface: class Part: - def __init__(self, name): + def __init__(self, name) -> None: self.pathes = [] self.path = [] @@ -140,11 +140,11 @@ class Part: class Path: - def __init__(self, path, params): + def __init__(self, path, params) -> None: self.path = path self.params = params - def __repr__(self): + def __repr__(self) -> str: l = len(self.path) # x1,y1 = self.path[0][1:3] if l>0: @@ -211,7 +211,7 @@ class Path: self.path = [p for n, p in enumerate(self.path) if p != self.path[n-1]] class Context: - def __init__(self, surface, *al, **ad): + def __init__(self, surface, *al, **ad) -> None: self._renderer = self._dwg = surface self._bounds = Extents() diff --git a/boxes/edges.py b/boxes/edges.py index 2882a45..334461b 100644 --- a/boxes/edges.py +++ b/boxes/edges.py @@ -116,7 +116,7 @@ class BoltPolicy(object): class Bolts(BoltPolicy): """Distribute a fixed number of bolts evenly""" - def __init__(self, bolts=1): + def __init__(self, bolts=1) -> None: self.bolts = bolts def numFingers(self, numFingers): @@ -211,7 +211,7 @@ class Settings(object): choices=choices, help=descriptions.get(name)) - def __init__(self, thickness, relative=True, **kw): + def __init__(self, thickness, relative=True, **kw) -> None: self.values = {} for name, value in self.absolute_params.items(): if isinstance(value, tuple): @@ -294,7 +294,7 @@ class BaseEdge(object): char: Optional[str] = None description = "Abstract Edge Class" - def __init__(self, boxes, settings): + def __init__(self, boxes, settings) -> None: self.boxes = boxes self.ctx = boxes.ctx self.settings = settings @@ -727,7 +727,7 @@ class CompoundEdge(BaseEdge): """Edge composed of multiple different Edges""" description = "Compound Edge" - def __init__(self, boxes, types, lengths): + def __init__(self, boxes, types, lengths) -> None: super(CompoundEdge, self).__init__(boxes, None) self.types = [self.edges.get(edge, edge) for edge in types] @@ -763,7 +763,7 @@ class Slot(BaseEdge): description = "Slot" - def __init__(self, boxes, depth): + def __init__(self, boxes, depth) -> None: super(Slot, self).__init__(boxes, None) self.depth = depth @@ -785,7 +785,7 @@ class SlottedEdge(BaseEdge): """Edge with multiple slots""" description = "Straight Edge with slots" - def __init__(self, boxes, sections, edge="e", slots=0): + def __init__(self, boxes, sections, edge="e", slots=0) -> None: super(SlottedEdge, self).__init__(boxes, Settings(boxes.thickness)) self.edge = self.edges.get(edge, edge) @@ -1019,7 +1019,7 @@ class FingerJointEdgeCounterPart(FingerJointEdge): class FingerHoles(FingerJointBase): """Hole matching a finger joint edge""" - def __init__(self, boxes, settings): + def __init__(self, boxes, settings) -> None: self.boxes = boxes self.ctx = boxes.ctx self.settings = settings @@ -1067,7 +1067,7 @@ class FingerHoleEdge(BaseEdge): char = 'h' description = "Edge (parallel Finger Joint Holes)" - def __init__(self, boxes, fingerHoles=None, **kw): + def __init__(self, boxes, fingerHoles=None, **kw) -> None: settings = None if isinstance(fingerHoles, Settings): settings = fingerHoles @@ -1106,7 +1106,7 @@ class CrossingFingerHoleEdge(Edge): description = "Edge (orthogonal Finger Joint Holes)" char = '|' - def __init__(self, boxes, height, fingerHoles=None, **kw): + def __init__(self, boxes, height, fingerHoles=None, **kw) -> None: super(CrossingFingerHoleEdge, self).__init__(boxes, None, **kw) self.fingerHoles = fingerHoles or boxes.fingerHolesAt @@ -1173,7 +1173,7 @@ class StackableBaseEdge(BaseEdge): description = "Abstract Stackable class" bottom = True - def __init__(self, boxes, settings, fingerjointsettings): + def __init__(self, boxes, settings, fingerjointsettings) -> None: super().__init__(boxes, settings) self.fingerjointsettings = fingerjointsettings @@ -1311,7 +1311,7 @@ class Hinge(BaseEdge): char = 'i' description = "Straight edge with hinge eye" - def __init__(self, boxes, settings=None, layout=1): + def __init__(self, boxes, settings=None, layout=1) -> None: super(Hinge, self).__init__(boxes, settings) if not (0 < layout <= 3): @@ -1400,7 +1400,7 @@ class HingePin(BaseEdge): char = 'I' description = "Edge with hinge pin" - def __init__(self, boxes, settings=None, layout=1): + def __init__(self, boxes, settings=None, layout=1) -> None: super(HingePin, self).__init__(boxes, settings) if not (0 < layout <= 3): @@ -1576,7 +1576,7 @@ class ChestHinge(BaseEdge): char = "o" - def __init__(self, boxes, settings=None, reversed=False): + def __init__(self, boxes, settings=None, reversed=False) -> None: super(ChestHinge, self).__init__(boxes, settings) self.reversed = reversed @@ -1632,7 +1632,7 @@ class ChestHingeTop(ChestHinge): char = "p" - def __init__(self, boxes, settings=None, reversed=False): + def __init__(self, boxes, settings=None, reversed=False) -> None: super(ChestHingeTop, self).__init__(boxes, settings) self.reversed = reversed @@ -1764,7 +1764,7 @@ class CabinetHingeEdge(BaseEdge): char = "u" description = "Edge with cabinet hinges" - def __init__(self, boxes, settings=None, top=False, angled=False): + def __init__(self, boxes, settings=None, top=False, angled=False) -> None: super(CabinetHingeEdge, self).__init__(boxes, settings) self.top = top self.angled = angled @@ -2433,7 +2433,7 @@ class RackEdge(BaseEdge): description = "Rack (and pinion) Edge" - def __init__(self, boxes, settings): + def __init__(self, boxes, settings) -> None: super(RackEdge, self).__init__(boxes, settings) self.gear = gears.Gears(boxes) diff --git a/boxes/extents.py b/boxes/extents.py index 2cfb810..74a38ad 100644 --- a/boxes/extents.py +++ b/boxes/extents.py @@ -1,7 +1,7 @@ class Extents: __slots__ = "xmin ymin xmax ymax".split() - def __init__(self,xmin=float('inf'),ymin=float('inf'),xmax=float('-inf'),ymax=float('-inf')): + def __init__(self,xmin=float('inf'),ymin=float('inf'),xmax=float('-inf'),ymax=float('-inf')) -> None: self.xmin = xmin self.ymin = ymin self.xmax = xmax @@ -40,5 +40,5 @@ class Extents: width = property(get_width) height = property(get_height) - def __repr__(self): + def __repr__(self) -> str: return f'Extents ({self.xmin},{self.ymin})-({self.xmax},{self.ymax})' diff --git a/boxes/formats.py b/boxes/formats.py index 0a14123..98f82c9 100644 --- a/boxes/formats.py +++ b/boxes/formats.py @@ -53,7 +53,7 @@ class Formats: # "" : [('Content-type', '')], } - def __init__(self): + def __init__(self) -> None: for cmd in self.pstoedit_candidates: self.pstoedit = shutil.which(cmd) if self.pstoedit: diff --git a/boxes/gears.py b/boxes/gears.py index 1954e26..0162b02 100644 --- a/boxes/gears.py +++ b/boxes/gears.py @@ -258,7 +258,7 @@ class OptionParser(argparse.ArgumentParser): class Gears(): - def __init__(self, boxes, **kw): + def __init__(self, boxes, **kw) -> None: # an alternate way to get debug info: # could use inkex.debug(string) instead... try: diff --git a/boxes/generators/__init__.py b/boxes/generators/__init__.py index 8e264e9..a156a28 100644 --- a/boxes/generators/__init__.py +++ b/boxes/generators/__init__.py @@ -8,7 +8,7 @@ ui_groups_by_name = {} class UIGroup: - def __init__(self, name, title=None, description="", image=""): + def __init__(self, name, title=None, description="", image="") -> None: self.name = name self.title = title or name self.description = description diff --git a/boxes/generators/_swtemplate.py b/boxes/generators/_swtemplate.py index 941b5ac..320e329 100644 --- a/boxes/generators/_swtemplate.py +++ b/boxes/generators/_swtemplate.py @@ -21,7 +21,7 @@ class SlatwallXXX(Boxes): # Change class name! ui_group = "SlatWall" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) diff --git a/boxes/generators/_template.py b/boxes/generators/_template.py index ee424ce..f7d7080 100644 --- a/boxes/generators/_template.py +++ b/boxes/generators/_template.py @@ -21,7 +21,7 @@ class BOX(Boxes): # Change class name! ui_group = "Unstable" # see ./__init__.py for names - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) # Uncomment the settings for the edge types you use diff --git a/boxes/generators/abox.py b/boxes/generators/abox.py index 93e1b0e..cf984d3 100644 --- a/boxes/generators/abox.py +++ b/boxes/generators/abox.py @@ -23,7 +23,7 @@ class ABox(Boxes): ui_group = "Box" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) self.buildArgParser("x", "y", "h", "outside", "bottom_edge") diff --git a/boxes/generators/agricolainsert.py b/boxes/generators/agricolainsert.py index 0cafa20..9418fe9 100644 --- a/boxes/generators/agricolainsert.py +++ b/boxes/generators/agricolainsert.py @@ -127,7 +127,7 @@ protruding underneath. """ - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=1.0) @@ -780,7 +780,7 @@ class MoorBoxSideEdge(edges.BaseEdge): Edge for the sides of the moor tiles box """ - def __init__(self, boxes, corner_length, corner_height, lower_corner): + def __init__(self, boxes, corner_length, corner_height, lower_corner) -> None: super().__init__(boxes, None) self.corner_height = corner_height self.lower_corner = lower_corner @@ -811,7 +811,7 @@ class MoorBoxHoleEdge(edges.BaseEdge): Edge which does the notches for the moor tiles box """ - def __init__(self, boxes, height, corner_height, lower_corner): + def __init__(self, boxes, height, corner_height, lower_corner) -> None: super().__init__(boxes, None) self.height = height self.corner_height = corner_height @@ -863,7 +863,7 @@ class BedHeadEdge(edges.BaseEdge): Edge which does the head side of the Agricola player box """ - def __init__(self, boxes, hole_depth): + def __init__(self, boxes, hole_depth) -> None: super().__init__(boxes, None) self.hole_depth = hole_depth @@ -894,7 +894,7 @@ class Bed2SidesEdge(edges.BaseEdge): The next edge should be a NoopEdge """ - def __init__(self, boxes, bed_length, full_head_length, full_foot_height): + def __init__(self, boxes, bed_length, full_head_length, full_foot_height) -> None: super().__init__(boxes, None) self.bed_length = bed_length self.full_head_length = full_head_length @@ -926,7 +926,7 @@ class NoopEdge(edges.BaseEdge): Edge which does nothing, not even turn or move. """ - def __init__(self, boxes): + def __init__(self, boxes) -> None: super().__init__(boxes, None) def __call__(self, length, **kw): diff --git a/boxes/generators/alledges.py b/boxes/generators/alledges.py index 63454bf..a1681b1 100644 --- a/boxes/generators/alledges.py +++ b/boxes/generators/alledges.py @@ -21,7 +21,7 @@ class AllEdges(Boxes): ui_group = "Misc" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) diff --git a/boxes/generators/angledbox.py b/boxes/generators/angledbox.py index 8ea36b7..9905867 100644 --- a/boxes/generators/angledbox.py +++ b/boxes/generators/angledbox.py @@ -22,7 +22,7 @@ class AngledBox(Boxes): ui_group = "Box" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) self.buildArgParser("x", "y", "h", "outside", "bottom_edge") diff --git a/boxes/generators/angledcutjig.py b/boxes/generators/angledcutjig.py index 1457989..5082f72 100644 --- a/boxes/generators/angledcutjig.py +++ b/boxes/generators/angledcutjig.py @@ -21,7 +21,7 @@ class AngledCutJig(Boxes): # Change class name! ui_group = "Misc" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=1.) diff --git a/boxes/generators/arcade.py b/boxes/generators/arcade.py index 66183ef..59b433a 100644 --- a/boxes/generators/arcade.py +++ b/boxes/generators/arcade.py @@ -19,7 +19,7 @@ from boxes import * class Arcade(Boxes): """Desktop Arcade Machine""" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) self.argparser.add_argument( diff --git a/boxes/generators/atreus21.py b/boxes/generators/atreus21.py index bc806ae..f370424 100644 --- a/boxes/generators/atreus21.py +++ b/boxes/generators/atreus21.py @@ -11,7 +11,7 @@ class Atreus21(Boxes, Keyboard): half_btn = btn_size / 2 border = 6 - def __init__(self): + def __init__(self) -> None: super().__init__() self.add_common_keyboard_parameters( # By default, columns from Atreus 21 diff --git a/boxes/generators/basedbox.py b/boxes/generators/basedbox.py index 32baf1e..fe55697 100644 --- a/boxes/generators/basedbox.py +++ b/boxes/generators/basedbox.py @@ -30,7 +30,7 @@ plate. The width of the "brim" can also be adjusted with the **edge_width** See ClosedBox for variant without a base. """ - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) self.buildArgParser("x", "y", "h", "outside") diff --git a/boxes/generators/bayonetbox.py b/boxes/generators/bayonetbox.py index 5dc2874..28e96cb 100644 --- a/boxes/generators/bayonetbox.py +++ b/boxes/generators/bayonetbox.py @@ -22,7 +22,7 @@ class BayonetBox(Boxes): description = """Glue together - all outside rings to the bottom, all inside rings to the top.""" ui_group = "Box" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.argparser.add_argument( diff --git a/boxes/generators/bintray.py b/boxes/generators/bintray.py index 26c4aca..08b8843 100644 --- a/boxes/generators/bintray.py +++ b/boxes/generators/bintray.py @@ -48,7 +48,7 @@ class BinTray(Boxes): ui_group = "Shelf" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.buildArgParser("sx", "sy", "h", "outside", "hole_dD") self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=0.5) diff --git a/boxes/generators/birdhouse.py b/boxes/generators/birdhouse.py index 20fdb29..b65605a 100644 --- a/boxes/generators/birdhouse.py +++ b/boxes/generators/birdhouse.py @@ -21,7 +21,7 @@ class BirdHouse(Boxes): ui_group = "Unstable" # "Misc" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings, finger=10.0,space=10.0) diff --git a/boxes/generators/bottlestack.py b/boxes/generators/bottlestack.py index b96d28b..9e9968c 100644 --- a/boxes/generators/bottlestack.py +++ b/boxes/generators/bottlestack.py @@ -26,7 +26,7 @@ Without the "double" option the stand is a bit more narrow. ui_group = "Misc" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.argparser.add_argument( diff --git a/boxes/generators/bottletag.py b/boxes/generators/bottletag.py index 32c917b..e5eed8f 100644 --- a/boxes/generators/bottletag.py +++ b/boxes/generators/bottletag.py @@ -22,7 +22,7 @@ class BottleTag(Boxes): ui_group = "Misc" # see ./__init__.py for names - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.buildArgParser() diff --git a/boxes/generators/breadbox.py b/boxes/generators/breadbox.py index 6376f45..15f9a37 100644 --- a/boxes/generators/breadbox.py +++ b/boxes/generators/breadbox.py @@ -93,7 +93,7 @@ class BreadBox(Boxes): self.polyline(0, 90, h, 90, l, 90, h, 90) self.move(l, h, move) - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=0.5) diff --git a/boxes/generators/burntest.py b/boxes/generators/burntest.py index 7051f8c..c1476aa 100644 --- a/boxes/generators/burntest.py +++ b/boxes/generators/burntest.py @@ -34,7 +34,7 @@ See also LBeam that can serve as compact BurnTest and FlexTest for testing flex ui_group = "Part" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) diff --git a/boxes/generators/can_storage.py b/boxes/generators/can_storage.py index dac3253..f29e4e2 100644 --- a/boxes/generators/can_storage.py +++ b/boxes/generators/can_storage.py @@ -89,7 +89,7 @@ for canned tomatoes: ui_group = "Misc" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings, finger=2.0, space=2.0, surroundingspaces=0.0) diff --git a/boxes/generators/cardbox.py b/boxes/generators/cardbox.py index ee01b08..a3c6bda 100644 --- a/boxes/generators/cardbox.py +++ b/boxes/generators/cardbox.py @@ -76,7 +76,7 @@ Details of the lid and rails Whole box (early version still missing grip rail on the lid): """ - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) self.buildArgParser(h=30) diff --git a/boxes/generators/cardholder.py b/boxes/generators/cardholder.py index 1fa6caf..ff04009 100644 --- a/boxes/generators/cardholder.py +++ b/boxes/generators/cardholder.py @@ -22,7 +22,7 @@ class CardHolder(Boxes): ui_group = "Shelf" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.GroovedSettings) diff --git a/boxes/generators/castle.py b/boxes/generators/castle.py index 930b20f..2f583a7 100644 --- a/boxes/generators/castle.py +++ b/boxes/generators/castle.py @@ -24,7 +24,7 @@ class Castle(Boxes): with towers and gates and walls that can be attached in multiple configurations.""" ui_group = "Unstable" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) diff --git a/boxes/generators/closedbox.py b/boxes/generators/closedbox.py index 4dced41..5487ae4 100644 --- a/boxes/generators/closedbox.py +++ b/boxes/generators/closedbox.py @@ -28,7 +28,7 @@ plate. See BasedBox for variant with a base.""" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) self.buildArgParser("x", "y", "h", "outside") diff --git a/boxes/generators/coffeecapsulesholder.py b/boxes/generators/coffeecapsulesholder.py index b648bca..5e26c2b 100644 --- a/boxes/generators/coffeecapsulesholder.py +++ b/boxes/generators/coffeecapsulesholder.py @@ -30,7 +30,7 @@ class CoffeeCapsuleHolder(Boxes): You can store your coffee capsule near your espresso machine with this. It works both vertically, or upside down under a shelf. """ - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.argparser.add_argument( "--columns", diff --git a/boxes/generators/coindisplay.py b/boxes/generators/coindisplay.py index d76eec8..c606575 100644 --- a/boxes/generators/coindisplay.py +++ b/boxes/generators/coindisplay.py @@ -41,7 +41,7 @@ class CoinDisplay(Boxes): ui_group = "Misc" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) diff --git a/boxes/generators/concaveknob.py b/boxes/generators/concaveknob.py index 9e7b0b9..7d026c3 100644 --- a/boxes/generators/concaveknob.py +++ b/boxes/generators/concaveknob.py @@ -21,7 +21,7 @@ class ConcaveKnob(Boxes): ui_group = "Part" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) # Add non default cli params if needed (see argparse std lib) diff --git a/boxes/generators/console.py b/boxes/generators/console.py index 83a835d..f2e3250 100644 --- a/boxes/generators/console.py +++ b/boxes/generators/console.py @@ -21,7 +21,7 @@ class Console(Boxes): ui_group = "Box" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=.5) diff --git a/boxes/generators/console2.py b/boxes/generators/console2.py index 284d963..bd2ac7a 100644 --- a/boxes/generators/console2.py +++ b/boxes/generators/console2.py @@ -51,7 +51,7 @@ The latches at the back wall lock in place when closed. To open them they need t To remove the panel you have to press in the four tabs at the side. It is easiest to push them in and then pull the panel up a little bit so the tabs stay in. """ - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=.5) diff --git a/boxes/generators/dicebox.py b/boxes/generators/dicebox.py index e80b2b9..2b0a30f 100644 --- a/boxes/generators/dicebox.py +++ b/boxes/generators/dicebox.py @@ -22,7 +22,7 @@ class DiceBox(Boxes): ui_group = "Box" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs( edges.FingerJointSettings, diff --git a/boxes/generators/dinrailbox.py b/boxes/generators/dinrailbox.py index 79b0905..c068200 100644 --- a/boxes/generators/dinrailbox.py +++ b/boxes/generators/dinrailbox.py @@ -19,7 +19,7 @@ from boxes import * class DinRailEdge(edges.FingerHoleEdge): - def __init__(self, boxes, settings, width=35.0, offset=0.0): + def __init__(self, boxes, settings, width=35.0, offset=0.0) -> None: super().__init__(boxes, settings) self.width = width self.offset = offset @@ -62,7 +62,7 @@ class DinRailBox(Boxes): self.move(tw, th, move) - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=.8) diff --git a/boxes/generators/discrack.py b/boxes/generators/discrack.py index 4014e65..21df7e6 100644 --- a/boxes/generators/discrack.py +++ b/boxes/generators/discrack.py @@ -78,7 +78,7 @@ class DiscRack(Boxes): ui_group = "Shelf" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.buildArgParser(sx="20*10") diff --git a/boxes/generators/dispenser.py b/boxes/generators/dispenser.py index 4091fa7..f74b7bc 100644 --- a/boxes/generators/dispenser.py +++ b/boxes/generators/dispenser.py @@ -41,7 +41,7 @@ Please add mounting holes yourself.""" ui_group = "Misc" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) diff --git a/boxes/generators/display.py b/boxes/generators/display.py index c077993..f52413d 100644 --- a/boxes/generators/display.py +++ b/boxes/generators/display.py @@ -22,7 +22,7 @@ class Display(Boxes): ui_group = "Misc" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.buildArgParser(x=150., h=200.0) diff --git a/boxes/generators/displaycase.py b/boxes/generators/displaycase.py index d185dd6..882e1b2 100644 --- a/boxes/generators/displaycase.py +++ b/boxes/generators/displaycase.py @@ -23,7 +23,7 @@ class DisplayCase(Boxes): ui_group = "Box" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) self.buildArgParser("x", "y", "h", "outside") diff --git a/boxes/generators/displayshelf.py b/boxes/generators/displayshelf.py index 817a7e9..5fe9a5a 100644 --- a/boxes/generators/displayshelf.py +++ b/boxes/generators/displayshelf.py @@ -21,7 +21,7 @@ class DisplayShelf(Boxes): # change class name here and below ui_group = "Shelf" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) diff --git a/boxes/generators/dividertray.py b/boxes/generators/dividertray.py index 9c6c5af..ea11636 100644 --- a/boxes/generators/dividertray.py +++ b/boxes/generators/dividertray.py @@ -88,7 +88,7 @@ You will likely need to cut each of the dividers you want multiple times. ui_group = "Tray" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) self.addSettingsArgs(edges.HandleEdgeSettings) @@ -365,7 +365,7 @@ You will likely need to cut each of the dividers you want multiple times. class SlottedEdgeDescriptions: - def __init__(self): + def __init__(self) -> None: self.descriptions = [] def add(self, description): @@ -399,13 +399,13 @@ class StraightEdgeDescription: round_edge_compensation=0, outside_ratio=1, angle_compensation=0, - ): + ) -> None: self.asked_length = asked_length self.round_edge_compensation = round_edge_compensation self.outside_ratio = outside_ratio self.angle_compensation = angle_compensation - def __repr__(self): + def __repr__(self) -> str: return ( "StraightEdgeDescription({0}, round_edge_compensation={1}, angle_compensation={2}, outside_ratio={3})" ).format( @@ -433,7 +433,7 @@ class StraightEdgeDescription: class Memoizer(dict): - def __init__(self, computation): + def __init__(self, computation) -> None: self.computation = computation def __missing__(self, key): @@ -447,14 +447,14 @@ class SlotDescription: def __init__( self, width, depth=20, angle=0, radius=0, start_radius=None, end_radius=None - ): + ) -> None: self.depth = depth self.width = width self.start_radius = radius if start_radius is None else start_radius self.end_radius = radius if end_radius is None else end_radius self.angle = angle - def __repr__(self): + def __repr__(self) -> str: return "SlotDescription({0}, depth={1}, angle={2}, start_radius={3}, end_radius={4})".format( self.width, self.depth, self.angle, self.start_radius, self.end_radius ) @@ -573,7 +573,7 @@ class DividerNotchesEdge(edges.BaseEdge): description = "Edge with multiple notches for easier access to dividers" - def __init__(self, boxes, sx): + def __init__(self, boxes, sx) -> None: super().__init__(boxes, None) @@ -618,7 +618,7 @@ class DividerSlotsEdge(edges.BaseEdge): description = "Edge with multiple angled rounded slots for dividers" - def __init__(self, boxes, descriptions): + def __init__(self, boxes, descriptions) -> None: super().__init__(boxes, None) diff --git a/boxes/generators/doubleflexdoorbox.py b/boxes/generators/doubleflexdoorbox.py index 9185585..0eb3e15 100644 --- a/boxes/generators/doubleflexdoorbox.py +++ b/boxes/generators/doubleflexdoorbox.py @@ -24,7 +24,7 @@ class DoubleFlexDoorBox(boxes.Boxes): ui_group = "FlexBox" - def __init__(self): + def __init__(self) -> None: boxes.Boxes.__init__(self) self.addSettingsArgs(boxes.edges.FingerJointSettings) self.addSettingsArgs(boxes.edges.FlexSettings) diff --git a/boxes/generators/drillbox.py b/boxes/generators/drillbox.py index 77ec32f..45abc63 100644 --- a/boxes/generators/drillbox.py +++ b/boxes/generators/drillbox.py @@ -22,7 +22,7 @@ class DrillBox(_TopEdge): ui_group = "Tray" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings, diff --git a/boxes/generators/drillstand.py b/boxes/generators/drillstand.py index f44e54c..2f882ec 100644 --- a/boxes/generators/drillstand.py +++ b/boxes/generators/drillstand.py @@ -38,7 +38,7 @@ Start with putting the slots of the inner walls together. Be especially careful ui_group = "Misc" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.StackableSettings, height=1.0, width=3) diff --git a/boxes/generators/edges.py b/boxes/generators/edges.py index c6e4169..04a4a56 100644 --- a/boxes/generators/edges.py +++ b/boxes/generators/edges.py @@ -21,7 +21,7 @@ class Edges(Boxes): webinterface = False - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) def render(self): diff --git a/boxes/generators/electronicsbox.py b/boxes/generators/electronicsbox.py index 87e8862..bdb4721 100644 --- a/boxes/generators/electronicsbox.py +++ b/boxes/generators/electronicsbox.py @@ -22,7 +22,7 @@ class ElectronicsBox(Boxes): ui_group = "Box" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) self.buildArgParser("x", "y", "h", "outside") diff --git a/boxes/generators/eurorackskiff.py b/boxes/generators/eurorackskiff.py index 55cc093..345ccd2 100644 --- a/boxes/generators/eurorackskiff.py +++ b/boxes/generators/eurorackskiff.py @@ -22,7 +22,7 @@ class EuroRackSkiff(Boxes): ui_group = "Box" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) self.buildArgParser("h") diff --git a/boxes/generators/fanhole.py b/boxes/generators/fanhole.py index 38929ab..fc6c336 100644 --- a/boxes/generators/fanhole.py +++ b/boxes/generators/fanhole.py @@ -21,7 +21,7 @@ class FanHole(Boxes): ui_group = "Holes" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.argparser.add_argument( diff --git a/boxes/generators/filltest.py b/boxes/generators/filltest.py index 714b2bd..23ff2ae 100644 --- a/boxes/generators/filltest.py +++ b/boxes/generators/filltest.py @@ -24,7 +24,7 @@ class FillTest(Boxes): # Change class name! ui_group = "Part" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(fillHolesSettings, fill_pattern="hex") diff --git a/boxes/generators/flexbox.py b/boxes/generators/flexbox.py index 07a5f3b..177eb10 100644 --- a/boxes/generators/flexbox.py +++ b/boxes/generators/flexbox.py @@ -24,7 +24,7 @@ class FlexBox(boxes.Boxes): ui_group = "FlexBox" - def __init__(self): + def __init__(self) -> None: boxes.Boxes.__init__(self) self.addSettingsArgs(boxes.edges.FingerJointSettings) self.addSettingsArgs(boxes.edges.FlexSettings) diff --git a/boxes/generators/flexbox2.py b/boxes/generators/flexbox2.py index c3de3c6..d976980 100644 --- a/boxes/generators/flexbox2.py +++ b/boxes/generators/flexbox2.py @@ -22,7 +22,7 @@ class FlexBox2(Boxes): ui_group = "FlexBox" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) self.addSettingsArgs(edges.FlexSettings) diff --git a/boxes/generators/flexbox3.py b/boxes/generators/flexbox3.py index 04308a4..cc8729f 100644 --- a/boxes/generators/flexbox3.py +++ b/boxes/generators/flexbox3.py @@ -22,7 +22,7 @@ class FlexBox3(Boxes): ui_group = "FlexBox" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=1) self.addSettingsArgs(edges.FlexSettings) diff --git a/boxes/generators/flexbox4.py b/boxes/generators/flexbox4.py index 8da706e..f925969 100644 --- a/boxes/generators/flexbox4.py +++ b/boxes/generators/flexbox4.py @@ -22,7 +22,7 @@ class FlexBox4(Boxes): ui_group = "FlexBox" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) self.addSettingsArgs(edges.FlexSettings) diff --git a/boxes/generators/flexbox5.py b/boxes/generators/flexbox5.py index 13b0e1c..b465268 100644 --- a/boxes/generators/flexbox5.py +++ b/boxes/generators/flexbox5.py @@ -24,7 +24,7 @@ class FlexBox5(boxes.Boxes): ui_group = "FlexBox" - def __init__(self): + def __init__(self) -> None: boxes.Boxes.__init__(self) self.addSettingsArgs(boxes.edges.FingerJointSettings) self.addSettingsArgs(boxes.edges.FlexSettings) diff --git a/boxes/generators/flextest.py b/boxes/generators/flextest.py index 302ff2c..1fd96c4 100644 --- a/boxes/generators/flextest.py +++ b/boxes/generators/flextest.py @@ -22,7 +22,7 @@ class FlexTest(Boxes): ui_group = "Part" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FlexSettings) self.buildArgParser("x", "y") diff --git a/boxes/generators/flextest2.py b/boxes/generators/flextest2.py index 36d8a96..7a69302 100644 --- a/boxes/generators/flextest2.py +++ b/boxes/generators/flextest2.py @@ -22,7 +22,7 @@ class FlexTest2(Boxes): ui_group = "Part" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.buildArgParser("x", "y") self.argparser.add_argument( diff --git a/boxes/generators/folder.py b/boxes/generators/folder.py index 0c2bd16..0a0d09f 100644 --- a/boxes/generators/folder.py +++ b/boxes/generators/folder.py @@ -20,7 +20,7 @@ from boxes import * class Folder(Boxes): """Book cover with flex for the spine""" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FlexSettings) self.buildArgParser("x", "y", "h") diff --git a/boxes/generators/gear.py b/boxes/generators/gear.py index 37c34d9..dabdd3d 100644 --- a/boxes/generators/gear.py +++ b/boxes/generators/gear.py @@ -21,7 +21,7 @@ class Gears(Boxes): ui_group = "Part" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.argparser.add_argument( "--teeth1", action="store", type=int, default=12, diff --git a/boxes/generators/gearbox.py b/boxes/generators/gearbox.py index 96f5123..bc3300a 100644 --- a/boxes/generators/gearbox.py +++ b/boxes/generators/gearbox.py @@ -22,7 +22,7 @@ class GearBox(Boxes): ui_group = "Part" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) self.argparser.add_argument( diff --git a/boxes/generators/gridfinitybase.py b/boxes/generators/gridfinitybase.py index 85208fa..60ed9f3 100644 --- a/boxes/generators/gridfinitybase.py +++ b/boxes/generators/gridfinitybase.py @@ -25,7 +25,7 @@ class GridfinityBase(Boxes): ui_group = "Tray" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings, space=4, finger=4) self.argparser.add_argument("--x", type=int, default=3, help="number of grids in X direction") diff --git a/boxes/generators/halfbox.py b/boxes/generators/halfbox.py index 83db9d0..1c569b0 100644 --- a/boxes/generators/halfbox.py +++ b/boxes/generators/halfbox.py @@ -35,7 +35,7 @@ and many more... """ ui_group = "Box" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings, finger=2.0,space=2.0) diff --git a/boxes/generators/heart.py b/boxes/generators/heart.py index 0e42629..172866d 100644 --- a/boxes/generators/heart.py +++ b/boxes/generators/heart.py @@ -21,7 +21,7 @@ class HeartBox(Boxes): ui_group = "FlexBox" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings, finger=1.0,space=1.0) diff --git a/boxes/generators/hingebox.py b/boxes/generators/hingebox.py index ba314c7..cd4cb51 100644 --- a/boxes/generators/hingebox.py +++ b/boxes/generators/hingebox.py @@ -28,7 +28,7 @@ Then attach the hinges on the inside of the box and then connect them to lid. """ ui_group = "Box" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) self.addSettingsArgs(edges.CabinetHingeSettings) diff --git a/boxes/generators/holepattern.py b/boxes/generators/holepattern.py index fbb8850..61b0e80 100644 --- a/boxes/generators/holepattern.py +++ b/boxes/generators/holepattern.py @@ -22,7 +22,7 @@ class HolePattern(Boxes): ui_group = "Holes" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(fillHolesSettings, fill_pattern="hex") diff --git a/boxes/generators/hooks.py b/boxes/generators/hooks.py index f41f59c..d2e9d38 100644 --- a/boxes/generators/hooks.py +++ b/boxes/generators/hooks.py @@ -22,7 +22,7 @@ class Hook(Boxes): ui_group = "Misc" # see ./__init__.py for names - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=0.5) diff --git a/boxes/generators/integratedhingebox.py b/boxes/generators/integratedhingebox.py index dbc2132..48d054d 100644 --- a/boxes/generators/integratedhingebox.py +++ b/boxes/generators/integratedhingebox.py @@ -22,7 +22,7 @@ class IntegratedHingeBox(Boxes): ui_group = "Box" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) self.addSettingsArgs(edges.ChestHingeSettings) diff --git a/boxes/generators/jigsaw.py b/boxes/generators/jigsaw.py index e82863b..bff3011 100644 --- a/boxes/generators/jigsaw.py +++ b/boxes/generators/jigsaw.py @@ -22,7 +22,7 @@ class JigsawPuzzle(Boxes): # change class name here and below webinterface = False # Change to make visible in web interface - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.count = 0 self.argparser.add_argument( diff --git a/boxes/generators/jointpanel.py b/boxes/generators/jointpanel.py index 8657b6f..57534c0 100644 --- a/boxes/generators/jointpanel.py +++ b/boxes/generators/jointpanel.py @@ -31,7 +31,7 @@ For plywood this method works well with a very stiff press fit. Aim for needing ui_group = "Misc" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs( diff --git a/boxes/generators/keyboard.py b/boxes/generators/keyboard.py index 01707b9..9486c69 100644 --- a/boxes/generators/keyboard.py +++ b/boxes/generators/keyboard.py @@ -34,7 +34,7 @@ class Keyboard: SWITCH_CASE_SIZE = 15.6 FRAME_CUTOUT = 14 - def __init__(self): + def __init__(self) -> None: pass def add_common_keyboard_parameters( diff --git a/boxes/generators/keypad.py b/boxes/generators/keypad.py index 5540282..23291c5 100644 --- a/boxes/generators/keypad.py +++ b/boxes/generators/keypad.py @@ -18,7 +18,7 @@ class Keypad(Boxes, Keyboard): box_padding = 10 triangle = 25.0 - def __init__(self): + def __init__(self) -> None: super().__init__() self.argparser.add_argument( '--h', action='store', type=int, default=30, diff --git a/boxes/generators/lamp.py b/boxes/generators/lamp.py index b7df83c..4ee8a1f 100644 --- a/boxes/generators/lamp.py +++ b/boxes/generators/lamp.py @@ -60,7 +60,7 @@ class RoundedTriangle(edges.Edge): class Lamp(Boxes): webinterface = False - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) self.buildArgParser(x=220, y=75, h=70) diff --git a/boxes/generators/laptopstand.py b/boxes/generators/laptopstand.py index f05f8f7..18d1414 100644 --- a/boxes/generators/laptopstand.py +++ b/boxes/generators/laptopstand.py @@ -24,7 +24,7 @@ class LaptopStand(Boxes): # Change class name! ui_group = "Misc" # see ./__init__.py for names - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.argparser.add_argument( diff --git a/boxes/generators/laserclamp.py b/boxes/generators/laserclamp.py index 823c9d0..d9f3111 100644 --- a/boxes/generators/laserclamp.py +++ b/boxes/generators/laserclamp.py @@ -27,7 +27,7 @@ parts sliding on each other to reduce friction. ui_group = "Misc" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=0) diff --git a/boxes/generators/laserholdfast.py b/boxes/generators/laserholdfast.py index bc21f03..602ea70 100644 --- a/boxes/generators/laserholdfast.py +++ b/boxes/generators/laserholdfast.py @@ -21,7 +21,7 @@ class LaserHoldfast(Boxes): ui_group = "Part" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.buildArgParser(x=25, h=40) diff --git a/boxes/generators/lbeam.py b/boxes/generators/lbeam.py index 9624163..62b4c41 100644 --- a/boxes/generators/lbeam.py +++ b/boxes/generators/lbeam.py @@ -21,7 +21,7 @@ class LBeam(Boxes): ui_group = "Part" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.buildArgParser("x", "y", "h", "outside") self.addSettingsArgs(edges.FingerJointSettings) diff --git a/boxes/generators/magazinefile.py b/boxes/generators/magazinefile.py index 5290f9d..0b2a066 100644 --- a/boxes/generators/magazinefile.py +++ b/boxes/generators/magazinefile.py @@ -20,7 +20,7 @@ from boxes.lids import _TopEdge class MagazineFile(Boxes): """Open magazine file""" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.buildArgParser(x=100, y=200, h=300, hi=0, outside=False) self.addSettingsArgs(edges.FingerJointSettings) diff --git a/boxes/generators/makitapowersupply.py b/boxes/generators/makitapowersupply.py index aa1c18c..d0af898 100644 --- a/boxes/generators/makitapowersupply.py +++ b/boxes/generators/makitapowersupply.py @@ -27,7 +27,7 @@ To allow powering by laptop power supply: flip switch, Lenovo round socket (or a ui_group = "Misc" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) diff --git a/boxes/generators/microrack.py b/boxes/generators/microrack.py index 43c4dff..b9ae331 100644 --- a/boxes/generators/microrack.py +++ b/boxes/generators/microrack.py @@ -23,7 +23,7 @@ class SBCMicroRack(Boxes): webinterface = True ui_group = "Shelf" # see ./__init__.py for names - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) diff --git a/boxes/generators/nemamount.py b/boxes/generators/nemamount.py index 0cd1257..b4708f9 100644 --- a/boxes/generators/nemamount.py +++ b/boxes/generators/nemamount.py @@ -21,7 +21,7 @@ class NemaMount(Boxes): ui_group = "Part" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) self.argparser.add_argument( diff --git a/boxes/generators/nemapattern.py b/boxes/generators/nemapattern.py index d4d25fd..3792510 100644 --- a/boxes/generators/nemapattern.py +++ b/boxes/generators/nemapattern.py @@ -21,7 +21,7 @@ class NemaPattern(Boxes): ui_group = "Holes" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) self.argparser.add_argument( diff --git a/boxes/generators/notesholder.py b/boxes/generators/notesholder.py index 7363a69..b4754aa 100644 --- a/boxes/generators/notesholder.py +++ b/boxes/generators/notesholder.py @@ -57,7 +57,7 @@ class NotesHolder(Boxes): ui_group = "Box" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=1) self.addSettingsArgs(edges.StackableSettings) diff --git a/boxes/generators/openbox.py b/boxes/generators/openbox.py index 0b16343..888afe2 100644 --- a/boxes/generators/openbox.py +++ b/boxes/generators/openbox.py @@ -21,7 +21,7 @@ class OpenBox(Boxes): ui_group = "Box" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.buildArgParser("x", "y", "h", "outside") self.argparser.add_argument( diff --git a/boxes/generators/organpipe.py b/boxes/generators/organpipe.py index 1d094fc..f9c4f74 100644 --- a/boxes/generators/organpipe.py +++ b/boxes/generators/organpipe.py @@ -45,7 +45,7 @@ class OrganPipe(Boxes): # Change class name! def getAirSpeed(self, wind_pressure, air_density=1.2): return (2.0 * (wind_pressure / air_density))**.5 - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings, finger=3.0, space=3.0, diff --git a/boxes/generators/ottobody.py b/boxes/generators/ottobody.py index c00988a..18a35c0 100644 --- a/boxes/generators/ottobody.py +++ b/boxes/generators/ottobody.py @@ -28,7 +28,7 @@ class OttoBody(Boxes): ui_group = "Misc" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) self.addSettingsArgs(edges.ChestHingeSettings) diff --git a/boxes/generators/ottolegs.py b/boxes/generators/ottolegs.py index 86e8e5a..165c793 100644 --- a/boxes/generators/ottolegs.py +++ b/boxes/generators/ottolegs.py @@ -29,7 +29,7 @@ class OttoLegs(Boxes): ui_group = "Misc" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings, finger=1.0, space=1.0, diff --git a/boxes/generators/ottosoles.py b/boxes/generators/ottosoles.py index 0cc64c2..9a2479d 100644 --- a/boxes/generators/ottosoles.py +++ b/boxes/generators/ottosoles.py @@ -21,7 +21,7 @@ class OttoSoles(Boxes): ui_group = "Misc" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.buildArgParser(x=58., y=38.) diff --git a/boxes/generators/paintbox.py b/boxes/generators/paintbox.py index 340559f..19de905 100644 --- a/boxes/generators/paintbox.py +++ b/boxes/generators/paintbox.py @@ -23,7 +23,7 @@ class PaintStorage(Boxes): webinterface = True ui_group = "Shelf" # see ./__init__.py for names - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) diff --git a/boxes/generators/paperbox.py b/boxes/generators/paperbox.py index 072b803..7ad1208 100644 --- a/boxes/generators/paperbox.py +++ b/boxes/generators/paperbox.py @@ -35,7 +35,7 @@ There is marks in the "outside leftover paper" to help see where to fold A paper creaser (or bone folder) is also useful. """ - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.buildArgParser("x", "y", "h") diff --git a/boxes/generators/phoneholder.py b/boxes/generators/phoneholder.py index 6369df8..9f92e3a 100644 --- a/boxes/generators/phoneholder.py +++ b/boxes/generators/phoneholder.py @@ -35,7 +35,7 @@ class PhoneHolder(Boxes): Default values are currently based on Galaxy S7. """ - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.argparser.add_argument( "--phone_height", @@ -213,7 +213,7 @@ class PhoneHolder(Boxes): class BottomEdge(edges.BaseEdge): - def __init__(self, boxes, support_start_height, support_spacing): + def __init__(self, boxes, support_start_height, support_spacing) -> None: super().__init__(boxes, None) self.support_start_height = support_start_height self.support_spacing = support_spacing @@ -241,7 +241,7 @@ class BottomEdge(edges.BaseEdge): class SideEdge(edges.BaseEdge): - def __init__(self, boxes, tab_start, tab_length, reverse=False): + def __init__(self, boxes, tab_start, tab_length, reverse=False) -> None: super().__init__(boxes, None) self.tab_start = tab_start self.tab_length = tab_length @@ -270,7 +270,7 @@ class SideEdge(edges.BaseEdge): class TabbedEdge(edges.BaseEdge): - def __init__(self, boxes, tab_start, tab_length, tab_depth, reverse=False): + def __init__(self, boxes, tab_start, tab_length, tab_depth, reverse=False) -> None: super().__init__(boxes, None) self.tab_start = tab_start self.tab_length = tab_length diff --git a/boxes/generators/planetary.py b/boxes/generators/planetary.py index 24520b7..a3b0d24 100644 --- a/boxes/generators/planetary.py +++ b/boxes/generators/planetary.py @@ -22,7 +22,7 @@ class Planetary(Boxes): ui_group = "Part" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.argparser.add_argument( "--sunteeth", action="store", type=int, default=8, diff --git a/boxes/generators/planetary2.py b/boxes/generators/planetary2.py index c0d3817..05d2eb3 100644 --- a/boxes/generators/planetary2.py +++ b/boxes/generators/planetary2.py @@ -24,7 +24,7 @@ class Planetary2(Boxes): description = """Still has issues. The middle planetary gears set must not have a mashing sun gear as it can't be a proper gear set.""" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.buildArgParser("nema_mount") self.argparser.add_argument( diff --git a/boxes/generators/platonic.py b/boxes/generators/platonic.py index 95ab8a8..8f84067 100644 --- a/boxes/generators/platonic.py +++ b/boxes/generators/platonic.py @@ -97,7 +97,7 @@ class Platonic(Boxes): "icosahedro": (20, 3), } - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=0) diff --git a/boxes/generators/polehook.py b/boxes/generators/polehook.py index 27b1f8c..719a70c 100644 --- a/boxes/generators/polehook.py +++ b/boxes/generators/polehook.py @@ -19,7 +19,7 @@ from boxes import * class PoleHook(Boxes): # change class name here and below """Hook for pole like things to be clamped to another pole""" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) # Uncomment the settings for the edge types you use diff --git a/boxes/generators/pulley.py b/boxes/generators/pulley.py index b1c3ae3..a5f2b5c 100644 --- a/boxes/generators/pulley.py +++ b/boxes/generators/pulley.py @@ -23,7 +23,7 @@ class Pulley(Boxes): ui_group = "Part" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) # remove cli params you do not need self.buildArgParser(h=6.) diff --git a/boxes/generators/rack19box.py b/boxes/generators/rack19box.py index 97a6e2a..421c2aa 100644 --- a/boxes/generators/rack19box.py +++ b/boxes/generators/rack19box.py @@ -22,7 +22,7 @@ class Rack19Box(Boxes): ui_group = "Box" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=0.5) self.argparser.add_argument( diff --git a/boxes/generators/rack19halfwidth.py b/boxes/generators/rack19halfwidth.py index 5094eb6..214c384 100644 --- a/boxes/generators/rack19halfwidth.py +++ b/boxes/generators/rack19halfwidth.py @@ -8,7 +8,7 @@ class Rack19HalfWidth(Boxes): ui_group = "Box" - def __init__(self): + def __init__(self) -> None: super().__init__() self.argparser.add_argument( '--ru_count', action='store', type=float, default=1, diff --git a/boxes/generators/rackbox.py b/boxes/generators/rackbox.py index 3d40d15..e31f6db 100644 --- a/boxes/generators/rackbox.py +++ b/boxes/generators/rackbox.py @@ -22,7 +22,7 @@ class RackBox(Boxes): ui_group = "Box" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=1.2) self.buildArgParser("x", "y", "h", "outside") diff --git a/boxes/generators/rectangularWall.py b/boxes/generators/rectangularWall.py index 8806ddf..ad3307c 100644 --- a/boxes/generators/rectangularWall.py +++ b/boxes/generators/rectangularWall.py @@ -21,7 +21,7 @@ class RectangularWall(Boxes): ui_group = "Part" # see ./__init__.py for names - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.CabinetHingeSettings) diff --git a/boxes/generators/regularbox.py b/boxes/generators/regularbox.py index 518a6d6..6503277 100644 --- a/boxes/generators/regularbox.py +++ b/boxes/generators/regularbox.py @@ -28,7 +28,7 @@ The lids needs to be glued. For the bayonet lid all outside rings attach to the ui_group = "Box" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=1) self.buildArgParser("h", "outside") diff --git a/boxes/generators/regularstarbox.py b/boxes/generators/regularstarbox.py index 58e968a..8eb1619 100644 --- a/boxes/generators/regularstarbox.py +++ b/boxes/generators/regularstarbox.py @@ -50,7 +50,7 @@ class RegularStarBox(Boxes): description = """![Open box](static/samples/RegularStarBox-2.jpg)""" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) self.buildArgParser("h", "outside") diff --git a/boxes/generators/robotarm.py b/boxes/generators/robotarm.py index 10d0ae0..dc381f3 100644 --- a/boxes/generators/robotarm.py +++ b/boxes/generators/robotarm.py @@ -22,7 +22,7 @@ class RobotArm(Boxes): # change class name here and below ui_group = "Part" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) diff --git a/boxes/generators/rotary.py b/boxes/generators/rotary.py index c54d779..e3ef663 100644 --- a/boxes/generators/rotary.py +++ b/boxes/generators/rotary.py @@ -84,7 +84,7 @@ class Rotary(Boxes): ui_group = "Unstable" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) diff --git a/boxes/generators/roundedbox.py b/boxes/generators/roundedbox.py index 91fdc96..a744c58 100644 --- a/boxes/generators/roundedbox.py +++ b/boxes/generators/roundedbox.py @@ -32,7 +32,7 @@ With lid: ui_group = "FlexBox" - def __init__(self): + def __init__(self) -> None: boxes.Boxes.__init__(self) self.addSettingsArgs(boxes.edges.FingerJointSettings) self.addSettingsArgs(boxes.edges.DoveTailSettings) diff --git a/boxes/generators/royalgame.py b/boxes/generators/royalgame.py index 653a8aa..3d07325 100644 --- a/boxes/generators/royalgame.py +++ b/boxes/generators/royalgame.py @@ -29,7 +29,7 @@ class RoyalGame(Boxes): """ - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) diff --git a/boxes/generators/shutterbox.py b/boxes/generators/shutterbox.py index 897bed6..87d96b1 100644 --- a/boxes/generators/shutterbox.py +++ b/boxes/generators/shutterbox.py @@ -137,7 +137,7 @@ class ShutterBox(Boxes): self.polyline(0, 90, h, 90, l, 90, h, 90) self.move(l, h, move) - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=0.5) diff --git a/boxes/generators/sidedoorhousing.py b/boxes/generators/sidedoorhousing.py index a6238cf..937c3db 100644 --- a/boxes/generators/sidedoorhousing.py +++ b/boxes/generators/sidedoorhousing.py @@ -37,7 +37,7 @@ For the removable walls you need to add the lips and latches. The U-shaped clamp The latches lock in place when closed. To open them they need to be pressed in and can then be moved aside. """ - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=.5) diff --git a/boxes/generators/silverwarebox.py b/boxes/generators/silverwarebox.py index 8a243a0..38b45cf 100644 --- a/boxes/generators/silverwarebox.py +++ b/boxes/generators/silverwarebox.py @@ -26,7 +26,7 @@ class Silverware(Boxes): ui_group = "Unstable" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.buildArgParser(x=250, y=154, h=120) diff --git a/boxes/generators/slidingdrawer.py b/boxes/generators/slidingdrawer.py index d5c274c..a909709 100644 --- a/boxes/generators/slidingdrawer.py +++ b/boxes/generators/slidingdrawer.py @@ -5,7 +5,7 @@ class SlidingDrawer(Boxes): ui_group = "Box" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.buildArgParser(x=60, y=100, h=30, outside='true') self.addSettingsArgs(edges.FingerJointSettings, finger=2.0, space=2.0) diff --git a/boxes/generators/spicesrack.py b/boxes/generators/spicesrack.py index bdd5e22..f76b07e 100644 --- a/boxes/generators/spicesrack.py +++ b/boxes/generators/spicesrack.py @@ -37,7 +37,7 @@ class SpicesRack(Boxes): ui_group = "Shelf" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings, surroundingspaces=1.0) diff --git a/boxes/generators/stachel.py b/boxes/generators/stachel.py index 184726d..06d5e51 100644 --- a/boxes/generators/stachel.py +++ b/boxes/generators/stachel.py @@ -22,7 +22,7 @@ class Stachel(Boxes): ui_group = "Misc" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.argparser.add_argument( diff --git a/boxes/generators/storagerack.py b/boxes/generators/storagerack.py index 84530f9..ebc3964 100644 --- a/boxes/generators/storagerack.py +++ b/boxes/generators/storagerack.py @@ -30,7 +30,7 @@ Drawers are not included: """ - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) self.addSettingsArgs(edges.StackableSettings) diff --git a/boxes/generators/storageshelf.py b/boxes/generators/storageshelf.py index c3da729..36ed088 100644 --- a/boxes/generators/storageshelf.py +++ b/boxes/generators/storageshelf.py @@ -23,7 +23,7 @@ class StorageShelf(_TopEdge): ui_group = "Shelf" description = "This is a simple shelf box." - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addTopEdgeSettings(fingerjoint={"surroundingspaces": 0.5}, roundedtriangle={"outset" : 1}) diff --git a/boxes/generators/trafficlight.py b/boxes/generators/trafficlight.py index ee83780..8458172 100644 --- a/boxes/generators/trafficlight.py +++ b/boxes/generators/trafficlight.py @@ -41,7 +41,7 @@ class TrafficLight(Boxes): # change class name here and below When turned by 90°, it can be also used to create a bottle holder.""" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) diff --git a/boxes/generators/trayinsert.py b/boxes/generators/trayinsert.py index 7bd1481..69eec1d 100644 --- a/boxes/generators/trayinsert.py +++ b/boxes/generators/trayinsert.py @@ -22,7 +22,7 @@ class TrayInsert(Boxes): ui_group = "Tray" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.buildArgParser("sx", "sy", "h", "outside") diff --git a/boxes/generators/traylayout.py b/boxes/generators/traylayout.py index 68e880f..4a99624 100644 --- a/boxes/generators/traylayout.py +++ b/boxes/generators/traylayout.py @@ -30,7 +30,7 @@ of sizes in x and y direction. Choose how many distances you need in both direct ui_group = "Tray" - def __init__(self, input=None, webargs=False): + def __init__(self, input=None, webargs=False) -> None: Boxes.__init__(self) self.argparser = argparse.ArgumentParser() self.argparser.add_argument( @@ -59,7 +59,7 @@ of sizes in x and y direction. Choose how many distances you need in both direct self.vwalls = [[True for i in range(x + 1)] for j in range(y)] self.floors = [[True for i in range(x)] for j in range(y)] - def __str__(self): + def __str__(self) -> str: r = [] for i, x in enumerate(self.x): @@ -93,7 +93,7 @@ vertical bars representing the walls with a space character to remove the walls. You can replace the space characters representing the floor by a "X" to remove the floor for this compartment. """ - def __init__(self, input=None, webargs=False): + def __init__(self, input=None, webargs=False) -> None: Boxes.__init__(self) self.addSettingsArgs(boxes.edges.FingerJointSettings) self.buildArgParser("h", "hi", "outside") diff --git a/boxes/generators/trianglelamp.py b/boxes/generators/trianglelamp.py index 354c14c..31a29e6 100644 --- a/boxes/generators/trianglelamp.py +++ b/boxes/generators/trianglelamp.py @@ -38,7 +38,7 @@ class TriangleLamp(Boxes): ui_group = "Misc" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings, finger=3.0,space=3.0, diff --git a/boxes/generators/two_piece.py b/boxes/generators/two_piece.py index 5ee1389..1f0ec34 100644 --- a/boxes/generators/two_piece.py +++ b/boxes/generators/two_piece.py @@ -30,7 +30,7 @@ Set *hi* larger than *h* to leave gap between the inner and outer shell. This ca ui_group = "Box" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.buildArgParser("x", "y", "h", "hi", "outside") self.addSettingsArgs(edges.FingerJointSettings, finger=2.0, space=2.0) diff --git a/boxes/generators/typetray.py b/boxes/generators/typetray.py index 86fd65c..ec98bc2 100644 --- a/boxes/generators/typetray.py +++ b/boxes/generators/typetray.py @@ -22,7 +22,7 @@ class TypeTray(_TopEdge): ui_group = "Tray" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addTopEdgeSettings(fingerjoint={"surroundingspaces": 0.5}, roundedtriangle={"outset" : 1}) diff --git a/boxes/generators/ubox.py b/boxes/generators/ubox.py index 83b9015..ae82ab9 100644 --- a/boxes/generators/ubox.py +++ b/boxes/generators/ubox.py @@ -23,7 +23,7 @@ class UBox(_TopEdge, _ChestLid): ui_group = "FlexBox" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addTopEdgeSettings() self.addSettingsArgs(edges.FlexSettings) diff --git a/boxes/generators/unevenheightbox.py b/boxes/generators/unevenheightbox.py index 93bb623..aade8a1 100644 --- a/boxes/generators/unevenheightbox.py +++ b/boxes/generators/unevenheightbox.py @@ -22,7 +22,7 @@ class UnevenHeightBox(Boxes): ui_group = "Box" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addSettingsArgs(edges.FingerJointSettings) self.addSettingsArgs(edges.GroovedSettings) diff --git a/boxes/generators/universalbox.py b/boxes/generators/universalbox.py index 35407f4..fad9d09 100644 --- a/boxes/generators/universalbox.py +++ b/boxes/generators/universalbox.py @@ -23,7 +23,7 @@ class UniversalBox(_TopEdge, _ChestLid): ui_group = "Box" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) self.addTopEdgeSettings(roundedtriangle={"outset" : 1}, hinge={"outset" : True}) diff --git a/boxes/generators/waivyknob.py b/boxes/generators/waivyknob.py index b644067..1eeb76e 100644 --- a/boxes/generators/waivyknob.py +++ b/boxes/generators/waivyknob.py @@ -21,7 +21,7 @@ class WaivyKnob(Boxes): ui_group = "Part" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) # Add non default cli params if needed (see argparse std lib) diff --git a/boxes/generators/wallcaliperholder.py b/boxes/generators/wallcaliperholder.py index 96b0ab9..a28d505 100644 --- a/boxes/generators/wallcaliperholder.py +++ b/boxes/generators/wallcaliperholder.py @@ -19,7 +19,7 @@ from boxes.walledges import _WallMountedBox class WallCaliper(_WallMountedBox): """Holds a single caliper to a wall""" - def __init__(self): + def __init__(self) -> None: super().__init__() # remove cli params you do not need diff --git a/boxes/generators/wallchiselholder.py b/boxes/generators/wallchiselholder.py index e8a60ee..90614d5 100644 --- a/boxes/generators/wallchiselholder.py +++ b/boxes/generators/wallchiselholder.py @@ -36,7 +36,7 @@ class FrontEdge(edges.Edge): class WallChiselHolder(_WallMountedBox): """Wall tool holder for chisels, files and similar tools""" - def __init__(self): + def __init__(self) -> None: super().__init__() self.buildArgParser(h=120) diff --git a/boxes/generators/wallconsole.py b/boxes/generators/wallconsole.py index aa609ec..13e9453 100644 --- a/boxes/generators/wallconsole.py +++ b/boxes/generators/wallconsole.py @@ -19,7 +19,7 @@ from boxes.walledges import _WallMountedBox class WallConsole(_WallMountedBox): """Outset and angled plate to mount stuff to""" - def __init__(self): + def __init__(self) -> None: super().__init__() self.buildArgParser(sx=100, h=100, outside=True) diff --git a/boxes/generators/walldrillbox.py b/boxes/generators/walldrillbox.py index 1e7c287..0ce024b 100644 --- a/boxes/generators/walldrillbox.py +++ b/boxes/generators/walldrillbox.py @@ -23,7 +23,7 @@ class WallDrillBox(DrillStand, _WallMountedBox): """Box for drills with each compartment with a different height""" ui_group = "WallMounted" - def __init__(self): + def __init__(self) -> None: _WallMountedBox.__init__(self) # don't call DrillStand.__init__ self.addSettingsArgs(edges.StackableSettings, height=1.0, width=3) diff --git a/boxes/generators/walledges.py b/boxes/generators/walledges.py index d1329c8..1176aef 100644 --- a/boxes/generators/walledges.py +++ b/boxes/generators/walledges.py @@ -19,7 +19,7 @@ from boxes.walledges import _WallMountedBox class WallEdges(_WallMountedBox): """Shows the different edge types for wall systems""" - def __init__(self): + def __init__(self) -> None: super().__init__() self.buildArgParser(h=120) diff --git a/boxes/generators/wallpinrow.py b/boxes/generators/wallpinrow.py index 8194315..3d3ac04 100644 --- a/boxes/generators/wallpinrow.py +++ b/boxes/generators/wallpinrow.py @@ -40,7 +40,7 @@ class PinEdge(edges.BaseEdge): class WallPinRow(_WallMountedBox): """Outset and angled plate to mount stuff to""" - def __init__(self): + def __init__(self) -> None: super().__init__() self.argparser.add_argument( diff --git a/boxes/generators/wallplaneholder.py b/boxes/generators/wallplaneholder.py index 37c8a54..5454102 100644 --- a/boxes/generators/wallplaneholder.py +++ b/boxes/generators/wallplaneholder.py @@ -19,7 +19,7 @@ from boxes.walledges import _WallMountedBox class WallPlaneHolder(_WallMountedBox): """Hold a plane to a wall""" - def __init__(self): + def __init__(self) -> None: super().__init__() self.argparser.add_argument( diff --git a/boxes/generators/wallpliersholder.py b/boxes/generators/wallpliersholder.py index cf59736..1bba89f 100644 --- a/boxes/generators/wallpliersholder.py +++ b/boxes/generators/wallpliersholder.py @@ -20,7 +20,7 @@ from boxes.walledges import _WallMountedBox class WallPliersHolder(_WallMountedBox): """Bar to hang pliers on""" - def __init__(self): + def __init__(self) -> None: super().__init__() self.buildArgParser(sx="100*3", y=50, h=50, outside=True) diff --git a/boxes/generators/wallslottedholder.py b/boxes/generators/wallslottedholder.py index f8db829..815fca9 100644 --- a/boxes/generators/wallslottedholder.py +++ b/boxes/generators/wallslottedholder.py @@ -33,7 +33,7 @@ class FrontEdge(edges.Edge): class WallSlottedHolder(_WallMountedBox): """Wall tool holder with slots""" - def __init__(self): + def __init__(self) -> None: super().__init__() self.buildArgParser(h=120) diff --git a/boxes/generators/wallstairs.py b/boxes/generators/wallstairs.py index dbf80ca..9929ef6 100644 --- a/boxes/generators/wallstairs.py +++ b/boxes/generators/wallstairs.py @@ -23,7 +23,7 @@ class WallStairs(_WallMountedBox): sh gives height of the stairs from front to back. Note that the overall width and height is bigger than the nominal values as walls and the protrusions are not included in the measurements. """ - def __init__(self): + def __init__(self) -> None: super().__init__() self.buildArgParser(sx="250/3", sy="40*3", sh="30:100:180") diff --git a/boxes/generators/walltypetray.py b/boxes/generators/walltypetray.py index fb24a26..c27bcba 100644 --- a/boxes/generators/walltypetray.py +++ b/boxes/generators/walltypetray.py @@ -21,7 +21,7 @@ from boxes.walledges import _WallMountedBox class WallTypeTray(_WallMountedBox, _TopEdge): """Type tray - allows only continuous walls""" - def __init__(self): + def __init__(self) -> None: super().__init__() self.addSettingsArgs(edges.StackableSettings) self.buildArgParser("sx", "sy", "h", "hi", "outside", "bottom_edge") diff --git a/boxes/generators/wallwrenchholder.py b/boxes/generators/wallwrenchholder.py index 93ba6e0..a74232a 100644 --- a/boxes/generators/wallwrenchholder.py +++ b/boxes/generators/wallwrenchholder.py @@ -46,7 +46,7 @@ class WallWrenchHolder(_WallMountedBox): """Hold a set of wrenches at a wall""" - def __init__(self): + def __init__(self) -> None: super().__init__() # remove cli params you do not need diff --git a/boxes/generators/winerack.py b/boxes/generators/winerack.py index 7ac5bb4..d23b11d 100644 --- a/boxes/generators/winerack.py +++ b/boxes/generators/winerack.py @@ -21,7 +21,7 @@ class WineRack(Boxes): ui_group = "Shelf" - def __init__(self): + def __init__(self) -> None: Boxes.__init__(self) # Uncomment the settings for the edge types you use diff --git a/boxes/parts.py b/boxes/parts.py index 69548e5..d869a03 100644 --- a/boxes/parts.py +++ b/boxes/parts.py @@ -10,7 +10,7 @@ def arcOnCircle(spanning_angle, outgoing_angle, r=1.0): class Parts: - def __init__(self, boxes): + def __init__(self, boxes) -> None: self.boxes = boxes """ diff --git a/boxes/pulley.py b/boxes/pulley.py index 50f2767..fc79ca5 100644 --- a/boxes/pulley.py +++ b/boxes/pulley.py @@ -79,7 +79,7 @@ class Pulley: "GT2_5mm" : [[-1.975908,-0.75],[-1.975908,0],[-1.797959,0.03212],[-1.646634,0.121224],[-1.534534,0.256431],[-1.474258,0.426861],[-1.446911,0.570808],[-1.411774,0.712722],[-1.368964,0.852287],[-1.318597,0.989189],[-1.260788,1.123115],[-1.195654,1.25375],[-1.12331,1.380781],[-1.043869,1.503892],[-0.935264,1.612278],[-0.817959,1.706414],[-0.693181,1.786237],[-0.562151,1.851687],[-0.426095,1.9027],[-0.286235,1.939214],[-0.143795,1.961168],[0,1.9685],[0.143796,1.961168],[0.286235,1.939214],[0.426095,1.9027],[0.562151,1.851687],[0.693181,1.786237],[0.817959,1.706414],[0.935263,1.612278],[1.043869,1.503892],[1.123207,1.380781],[1.195509,1.25375],[1.26065,1.123115],[1.318507,0.989189],[1.368956,0.852287],[1.411872,0.712722],[1.447132,0.570808],[1.474611,0.426861],[1.534583,0.256431],[1.646678,0.121223],[1.798064,0.03212],[1.975908,0],[1.975908,-0.75]], } - def __init__(self, boxes): + def __init__(self, boxes) -> None: self.boxes = boxes @classmethod diff --git a/boxes/robot.py b/boxes/robot.py index 22c07b9..6359ff9 100644 --- a/boxes/robot.py +++ b/boxes/robot.py @@ -9,7 +9,7 @@ __all__ = [ class RobotArg: - def __init__(self, includenone=False): + def __init__(self, includenone=False) -> None: self.robotarms = [ (name, globals()[name].__doc__[23:]) for name in __all__ if name.startswith("RobotArm")] @@ -32,7 +32,7 @@ class RobotArg: class _RobotArm: - def __init__(self, boxes, servo, servo2=None): + def __init__(self, boxes, servo, servo2=None) -> None: self.boxes = boxes self.servo = servo self.servo2 = servo2 or servo diff --git a/boxes/servos.py b/boxes/servos.py index 5b04f15..12e2e97 100644 --- a/boxes/servos.py +++ b/boxes/servos.py @@ -8,7 +8,7 @@ class EyeEdge(boxes.edges.FingerHoleEdge): char = "m" def __init__(self, boxes, servo, fingerHoles=None, driven=False, - outset=False, **kw): + outset=False, **kw) -> None: self.servo = servo self.outset = outset self.driven = driven @@ -49,7 +49,7 @@ def buildEdges(boxes, servo, chars="mMnN"): class ServoArg: - def __init__(self, includenone=False): + def __init__(self, includenone=False) -> None: self.servos = ["Servo9g"] if includenone: self.servos[0:0] = ["none"] @@ -69,7 +69,7 @@ class ServoArg: class Servo: - def __init__(self, boxes, axle=3): + def __init__(self, boxes, axle=3) -> None: self.boxes = boxes self.axle = axle self._edges = buildEdges(boxes, self) diff --git a/boxes/walledges.py b/boxes/walledges.py index ae49955..00157f7 100644 --- a/boxes/walledges.py +++ b/boxes/walledges.py @@ -7,7 +7,7 @@ from .edges import Settings, BaseEdge class _WallMountedBox(Boxes): ui_group = "WallMounted" - def __init__(self): + def __init__(self) -> None: super().__init__() self.addWallSettingsArgs() @@ -139,7 +139,7 @@ class WallHoleEdge(WallHoles): """Edge with holes for a parallel finger joint""" description = "Edge (parallel slot wall Holes)" - def __init__(self, boxes, wallHoles, **kw): + def __init__(self, boxes, wallHoles, **kw) -> None: super().__init__(boxes, wallHoles.settings, **kw) self.wallHoles = wallHoles diff --git a/scripts/boxes2inkscape b/scripts/boxes2inkscape index 9fd0cc5..5bed0a7 100755 --- a/scripts/boxes2inkscape +++ b/scripts/boxes2inkscape @@ -26,7 +26,7 @@ except ImportError: import boxes.generators class Boxes2INX: - def __init__(self): + def __init__(self) -> None: self.boxes = {b.__name__ : b() for b in boxes.generators.getAllBoxGenerators().values() if b.webinterface} self.groups = boxes.generators.ui_groups self.groups_by_name = boxes.generators.ui_groups_by_name diff --git a/scripts/boxes2pot b/scripts/boxes2pot index 8022701..6583683 100755 --- a/scripts/boxes2pot +++ b/scripts/boxes2pot @@ -27,7 +27,7 @@ from boxes import edges class DefaultParams(boxes.Boxes): - def __init__(self): + def __init__(self) -> None: boxes.Boxes.__init__(self) self.buildArgParser("x", "y", "h", "hi", "sx", "sy", "sh", "bottom_edge", "top_edge", "outside", "nema_mount") @@ -39,7 +39,7 @@ class DefaultParams(boxes.Boxes): self.addSettingsArgs(edges.FlexSettings) class Boxes2pot: - def __init__(self): + def __init__(self) -> None: self.messages = [] self.message_set = set() self.boxes = {b.__name__ : b() for b in boxes.generators.getAllBoxGenerators().values() if b.webinterface} diff --git a/scripts/boxesserver b/scripts/boxesserver index ab4b886..154553a 100755 --- a/scripts/boxesserver +++ b/scripts/boxesserver @@ -39,7 +39,7 @@ except ImportError: import boxes.generators class FileChecker(threading.Thread): - def __init__(self, files=[], checkmodules=True): + def __init__(self, files=[], checkmodules=True) -> None: super(FileChecker, self).__init__() self.checkmodules = checkmodules self.timestamps = {} @@ -92,7 +92,7 @@ class BServer: lang_re = re.compile(r"([a-z]{2,3}(-[-a-zA-Z0-9]*)?)\s*(;\s*q=(\d\.?\d*))?") - def __init__(self): + def __init__(self) -> None: self.boxes = {b.__name__ : b for b in boxes.generators.getAllBoxGenerators().values() if b.webinterface} self.boxes['TrayLayout2'] = boxes.generators.traylayout.TrayLayout2 self.groups = boxes.generators.ui_groups