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.
This commit is contained in:
Ghostkeeper 2018-06-15 11:30:49 +02:00
parent 105f6d4271
commit 7d98167383
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A
2 changed files with 4 additions and 3 deletions

View file

@ -42,7 +42,7 @@ class PickingPass(RenderPass):
batch = RenderBatch(self._shader)
# Fill up the batch with objects that can be sliced. `
for node in DepthFirstIterator(self._scene.getRoot()):
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():
batch.addItem(node.getWorldTransformation(), node.getMeshData())