Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2018-06-15 12:30:49 +0300
committerGhostkeeper <rubend@tutanota.com>2018-06-15 12:30:49 +0300
commit7d9816738323b7523222bc59c46922f73d9afa8b (patch)
tree55bc8bb2a13f83758bf41467533d035d3b537180 /cura/PreviewPass.py
parent105f6d4271e0421d44d7907681f3041443853ba3 (diff)
Ignore type errors arising from misinterpretation of DepthFirstIterator type
MyPy requests that this needs to have a __next__ function, but actually Python calls the __iter__ function first and then calls the __next__ function on the result of that. MyPy is wrong here. Contributes to issue CURA-5330.
Diffstat (limited to 'cura/PreviewPass.py')
-rw-r--r--cura/PreviewPass.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/cura/PreviewPass.py b/cura/PreviewPass.py
index 22f50890a3..e9f6a3a548 100644
--- a/cura/PreviewPass.py
+++ b/cura/PreviewPass.py
@@ -1,5 +1,6 @@
# Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
+
from UM.Application import Application
from UM.Resources import Resources
@@ -78,8 +79,8 @@ class PreviewPass(RenderPass):
batch = RenderBatch(self._shader)
batch_support_mesh = RenderBatch(self._support_mesh_shader)
- # Fill up the batch with objects that can be sliced. `
- for node in DepthFirstIterator(self._scene.getRoot()):
+ # Fill up the batch with objects that can be sliced.
+ for node in DepthFirstIterator(self._scene.getRoot()): #type: ignore #Ignore type error because iter() should get called automatically by Python syntax.
if node.callDecoration("isSliceable") and node.getMeshData() and node.isVisible():
per_mesh_stack = node.callDecoration("getStack")
if node.callDecoration("isNonThumbnailVisibleMesh"):