diff --git a/nimble_build_system/cad/fasteners.py b/nimble_build_system/cad/fasteners.py index 3061d29..26434cc 100644 --- a/nimble_build_system/cad/fasteners.py +++ b/nimble_build_system/cad/fasteners.py @@ -13,7 +13,16 @@ class Fastener: _fastener_type = "iso7380_1" _direction_axis = "-Z" - def __init__(self, name, position, explode_translation, size, fastener_type, direction_axis): + def __init__( + self, + name:str, + *, + position:tuple[float, float, float]=(0.0, 0.0, 0.0), + explode_translation:tuple[float, float, float]=(0.0, 0.0, 0.0), + size:str="M3-0.5", + fastener_type:str="iso7380_1", + direction_axis:str="-Z" + ): """ Generic fastener constructor that sets common attributes for all faster types. """ @@ -80,15 +89,31 @@ class Screw(Fastener): """ _length = 6 # mm - def __init__(self, name, position, explode_translation, size, fastener_type, axis, length): + def __init__( + self, + name:str, + *, + position:tuple[float, float, float]=(0.0, 0.0, 0.0), + explode_translation:tuple[float, float, float]=(0.0, 0.0, 0.0), + size:str="M3-0.5", + fastener_type:str="iso7380_1", + axis:str="-Z", + length:float=6.0 + ): """ Screw constructor that additionally sets the length of the screw. """ - # pylint: disable=too-many-arguments self._length = length - super().__init__(name, position, explode_translation, size, fastener_type, axis) + super().__init__( + name, + position=position, + explode_translation=explode_translation, + size=size, + fastener_type=fastener_type, + direction_axis=axis + ) @property def length(self): diff --git a/nimble_build_system/cad/shelf.py b/nimble_build_system/cad/shelf.py index a14b20e..4beaef2 100644 --- a/nimble_build_system/cad/shelf.py +++ b/nimble_build_system/cad/shelf.py @@ -7,7 +7,6 @@ """ # pylint: disable=unused-import -# pylint: disable=too-many-positional-arguments import os import posixpath @@ -135,7 +134,6 @@ def __init__(self, rack_params: RackParameters ): - # pylint: disable=too-many-arguments self._rack_params = rack_params @@ -821,10 +819,10 @@ def __init__(self, } super().__init__(device, - assembly_key, - position, - color, - rack_params) + assembly_key=assembly_key, + position=position, + color=color, + rack_params=rack_params) def generate_shelf_model(self):