Browse Source

CuraContainerStack.py: improve TypeIndexMap

Cleaner and more idiomatic way to reverse a dictionary
digitalfrost 2 years ago
parent
commit
60c8712b10
1 changed files with 1 additions and 1 deletions
  1. 1 1
      cura/Settings/CuraContainerStack.py

+ 1 - 1
cura/Settings/CuraContainerStack.py

@@ -427,4 +427,4 @@ class _ContainerIndexes:
     }
 
     # Reverse lookup: type -> index
-    TypeIndexMap = dict([(v, k) for k, v in IndexTypeMap.items()])
+    TypeIndexMap = {v: k for k, v in IndexTypeMap.items()}