Fix typing issues

This commit is contained in:
Jaime van Kessel 2019-08-29 16:23:10 +02:00
parent 2676c7fa2f
commit d548404dfd
4 changed files with 10 additions and 4 deletions

View file

@ -14,6 +14,7 @@ if TYPE_CHECKING:
from typing import Dict
from cura.Machines.MachineNode import MachineNode
## This class represents an extruder variant in the container tree.
#
# The subnodes of these nodes are materials.
@ -54,7 +55,7 @@ class VariantNode(ContainerNode):
materials_per_base_file = {material["base_file"]: material for material in all_materials}
materials_per_base_file.update({material["base_file"]: material for material in printer_specific_materials}) # Printer-specific profiles override global ones.
materials_per_base_file.update({material["base_file"]: material for material in variant_specific_materials}) # Variant-specific profiles override all of those.
materials = materials_per_base_file.values()
materials = list(materials_per_base_file.values())
# Filter materials based on the exclude_materials property.
filtered_materials = [material for material in materials if material["id"] not in self.machine.exclude_materials]