mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 22:35:03 -06:00
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:
parent
105f6d4271
commit
7d98167383
2 changed files with 4 additions and 3 deletions
|
@ -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())
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue