Fix mypy type errors

CURA-6057
This commit is contained in:
Jaime van Kessel 2019-03-27 17:40:33 +01:00
parent 9091eaa6f8
commit 84aa7fd007
2 changed files with 12 additions and 10 deletions

View file

@ -51,12 +51,14 @@ class ObjectsModel(ListModel):
group_nr = 1
name_count_dict = defaultdict(int) # type: Dict[str, int]
for node in DepthFirstIterator(Application.getInstance().getController().getScene().getRoot()):
for node in DepthFirstIterator(Application.getInstance().getController().getScene().getRoot()): # type: ignore
if not isinstance(node, SceneNode):
continue
if (not node.getMeshData() and not node.callDecoration("getLayerData")) and not node.callDecoration("isGroup"):
continue
if node.getParent() and node.getParent().callDecoration("isGroup"):
parent = node.getParent()
if parent and parent.callDecoration("isGroup"):
continue # Grouped nodes don't need resetting as their parent (the group) is resetted)
if not node.callDecoration("isSliceable") and not node.callDecoration("isGroup"):
continue
@ -72,7 +74,7 @@ class ObjectsModel(ListModel):
group_nr += 1
if hasattr(node, "isOutsideBuildArea"):
is_outside_build_area = node.isOutsideBuildArea()
is_outside_build_area = node.isOutsideBuildArea() # type: ignore
else:
is_outside_build_area = False