Browse Source

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 <spijker.jelle@gmail.com>
digitalfrost 2 years ago
parent
commit
250c038e03
1 changed files with 1 additions and 1 deletions
  1. 1 1
      cura/Settings/CuraContainerStack.py

+ 1 - 1
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