Add missing typing

CURA-6702
This commit is contained in:
Jaime van Kessel 2019-08-12 14:23:53 +02:00
parent 5bc7ddf3ee
commit 789eddbdee

View file

@ -2,10 +2,12 @@
# Cura is released under the terms of the LGPLv3 or higher.
import copy
from typing import List
from UM.Job import Job
from UM.Operations.GroupedOperation import GroupedOperation
from UM.Message import Message
from UM.Scene.SceneNode import SceneNode
from UM.i18n import i18nCatalog
i18n_catalog = i18nCatalog("cura")
@ -23,7 +25,7 @@ class MultiplyObjectsJob(Job):
self._count = count
self._min_offset = min_offset
def run(self):
def run(self) -> None:
status_message = Message(i18n_catalog.i18nc("@info:status", "Multiplying and placing objects"), lifetime=0,
dismissable=False, progress=0, title = i18n_catalog.i18nc("@info:title", "Placing Objects"))
status_message.show()
@ -33,13 +35,15 @@ class MultiplyObjectsJob(Job):
current_progress = 0
global_container_stack = Application.getInstance().getGlobalContainerStack()
if global_container_stack is None:
return # We can't do anything in this case.
machine_width = global_container_stack.getProperty("machine_width", "value")
machine_depth = global_container_stack.getProperty("machine_depth", "value")
root = scene.getRoot()
scale = 0.5
arranger = Arrange.create(x = machine_width, y = machine_depth, scene_root = root, scale = scale, min_offset = self._min_offset)
processed_nodes = []
processed_nodes = [] # type: List[SceneNode]
nodes = []
not_fit_count = 0