CuraContainerStack.py: improve TypeIndexMap

Cleaner and more idiomatic way to reverse a dictionary
This commit is contained in:
digitalfrost 2022-08-09 11:42:18 +02:00
parent 2968f96e85
commit 60c8712b10

View file

@ -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()}