From 250c038e037712b1a84befa0b3d5e36d963fc4ab Mon Sep 17 00:00:00 2001 From: digitalfrost Date: Tue, 6 Sep 2022 11:41:50 +0200 Subject: [PATCH] CuraContainerStack.py: iterate directly over IndexTypeMap (#12988) * CuraContainerStack.py: iterate directly over IndexTypeMap There is no need for range(len Co-authored-by: Jelle Spijker --- cura/Settings/CuraContainerStack.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/Settings/CuraContainerStack.py b/cura/Settings/CuraContainerStack.py index a8a1d780ea..41502f8874 100755 --- a/cura/Settings/CuraContainerStack.py +++ b/cura/Settings/CuraContainerStack.py @@ -49,7 +49,7 @@ class CuraContainerStack(ContainerStack): self._empty_material = cura_empty_instance_containers.empty_material_container #type: InstanceContainer self._empty_variant = cura_empty_instance_containers.empty_variant_container #type: InstanceContainer - self._containers = [self._empty_instance_container for i in range(len(_ContainerIndexes.IndexTypeMap))] #type: List[ContainerInterface] + self._containers: List[ContainerInterface] = [self._empty_instance_container for i in _ContainerIndexes.IndexTypeMap] self._containers[_ContainerIndexes.QualityChanges] = self._empty_quality_changes self._containers[_ContainerIndexes.Quality] = self._empty_quality self._containers[_ContainerIndexes.Material] = self._empty_material