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>
This commit is contained in:
digitalfrost 2022-09-06 11:41:50 +02:00 committed by GitHub
parent e30b85fc18
commit 250c038e03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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