Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCasper Lamboo <c.lamboo@ultimaker.com>2022-09-12 15:20:06 +0300
committerGitHub <noreply@github.com>2022-09-12 15:20:06 +0300
commite3fc73f17d878c46727ffb190a3a46c1f205b782 (patch)
tree377997096d1c7f1ba5aab0eeb97c007dcb7b9fbe /cura/Machines
parent0f36f833731838d3716398251271450c62b6b781 (diff)
Simplify if notation
CURA-9278
Diffstat (limited to 'cura/Machines')
-rw-r--r--cura/Machines/Models/CompatibleMachineModel.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/cura/Machines/Models/CompatibleMachineModel.py b/cura/Machines/Models/CompatibleMachineModel.py
index c4143be228..80fa78a64a 100644
--- a/cura/Machines/Models/CompatibleMachineModel.py
+++ b/cura/Machines/Models/CompatibleMachineModel.py
@@ -47,11 +47,13 @@ class CompatibleMachineModel(ListModel):
compatible_type = machine_manager.activeMachine.extruderList[extruder.getPosition()].material.getMetaDataEntry("material", "")
has_compatible_material = extruder.activeMaterial and compatible_type in [extruder.activeMaterial.type, None, "None", "", "empty"]
- materials = [] if not has_compatible_material else [{
+ materials = []
+ if has_compatible_material:
+ materials.append({
"brand": extruder.activeMaterial.brand,
"name": extruder.activeMaterial.name,
- "hexcolor": extruder.activeMaterial.color
- }]
+ "hexcolor": extruder.activeMaterial.color,
+ })
extruder_configs[extruder.getPosition()] = {
"position": extruder.getPosition(),
"core": extruder.hotendID,