mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Fix typing in __init__ methods to appease MYPY
This commit is contained in:
parent
9f023eb28e
commit
6abf916ced
7 changed files with 7 additions and 7 deletions
|
@ -15,7 +15,7 @@ if TYPE_CHECKING:
|
||||||
|
|
||||||
|
|
||||||
class CuraPackageManager(PackageManager):
|
class CuraPackageManager(PackageManager):
|
||||||
def __init__(self, application: "QtApplication", parent: Optional["QObject"] = None):
|
def __init__(self, application: "QtApplication", parent: Optional["QObject"] = None) -> None:
|
||||||
super().__init__(application, parent)
|
super().__init__(application, parent)
|
||||||
|
|
||||||
def initialize(self) -> None:
|
def initialize(self) -> None:
|
||||||
|
|
|
@ -122,6 +122,6 @@ class _ObjectOrder:
|
||||||
# \param order List of indices in which to print objects, ordered by printing
|
# \param order List of indices in which to print objects, ordered by printing
|
||||||
# order.
|
# order.
|
||||||
# \param todo: List of indices which are not yet inserted into the order list.
|
# \param todo: List of indices which are not yet inserted into the order list.
|
||||||
def __init__(self, order: List[SceneNode], todo: List[SceneNode]):
|
def __init__(self, order: List[SceneNode], todo: List[SceneNode]) -> None:
|
||||||
self.order = order
|
self.order = order
|
||||||
self.todo = todo
|
self.todo = todo
|
||||||
|
|
|
@ -8,7 +8,7 @@ from UM.Scene.SceneNode import SceneNode
|
||||||
|
|
||||||
## A specialised operation designed specifically to modify the previous operation.
|
## A specialised operation designed specifically to modify the previous operation.
|
||||||
class PlatformPhysicsOperation(Operation):
|
class PlatformPhysicsOperation(Operation):
|
||||||
def __init__(self, node: SceneNode, translation: Vector):
|
def __init__(self, node: SceneNode, translation: Vector) -> None:
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self._node = node
|
self._node = node
|
||||||
self._old_transformation = node.getLocalTransformation()
|
self._old_transformation = node.getLocalTransformation()
|
||||||
|
|
|
@ -14,7 +14,7 @@ class SetParentOperation(Operation.Operation):
|
||||||
#
|
#
|
||||||
# \param node The node which will be reparented.
|
# \param node The node which will be reparented.
|
||||||
# \param parent_node The node which will be the parent.
|
# \param parent_node The node which will be the parent.
|
||||||
def __init__(self, node: SceneNode, parent_node: Optional[SceneNode]):
|
def __init__(self, node: SceneNode, parent_node: Optional[SceneNode]) -> None:
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self._node = node
|
self._node = node
|
||||||
self._parent = parent_node
|
self._parent = parent_node
|
||||||
|
|
|
@ -35,7 +35,7 @@ class GCodeStep():
|
||||||
Class to store the current value of each G_Code parameter
|
Class to store the current value of each G_Code parameter
|
||||||
for any G-Code step
|
for any G-Code step
|
||||||
"""
|
"""
|
||||||
def __init__(self, step, in_relative_movement: bool = False):
|
def __init__(self, step, in_relative_movement: bool = False) -> None:
|
||||||
self.step = step
|
self.step = step
|
||||||
self.step_x = 0
|
self.step_x = 0
|
||||||
self.step_y = 0
|
self.step_y = 0
|
||||||
|
|
|
@ -11,7 +11,7 @@ if TYPE_CHECKING:
|
||||||
|
|
||||||
|
|
||||||
class SimulationViewProxy(QObject):
|
class SimulationViewProxy(QObject):
|
||||||
def __init__(self, simulation_view: "SimulationView", parent=None):
|
def __init__(self, simulation_view: "SimulationView", parent=None) -> None:
|
||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
self._simulation_view = simulation_view
|
self._simulation_view = simulation_view
|
||||||
self._current_layer = 0
|
self._current_layer = 0
|
||||||
|
|
|
@ -14,7 +14,7 @@ class ClusterPrinterMaterialStationSlot(ClusterPrintCoreConfiguration):
|
||||||
# \param material_remaining: How much material is remaining on the spool (between 0 and 1, or -1 for missing data).
|
# \param material_remaining: How much material is remaining on the spool (between 0 and 1, or -1 for missing data).
|
||||||
# \param material_empty: Whether the material spool is too empty to be used.
|
# \param material_empty: Whether the material spool is too empty to be used.
|
||||||
def __init__(self, slot_index: int, compatible: bool, material_remaining: float,
|
def __init__(self, slot_index: int, compatible: bool, material_remaining: float,
|
||||||
material_empty: Optional[bool] = False, **kwargs):
|
material_empty: Optional[bool] = False, **kwargs) -> None:
|
||||||
self.slot_index = slot_index
|
self.slot_index = slot_index
|
||||||
self.compatible = compatible
|
self.compatible = compatible
|
||||||
self.material_remaining = material_remaining
|
self.material_remaining = material_remaining
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue