From 6640f13be16651e328dd19ae8a8d95177caddf4e Mon Sep 17 00:00:00 2001 From: Chris Hennes Date: Sun, 28 Feb 2021 23:42:14 -0600 Subject: [PATCH] [Arch] Refactor to eliminate unused variable LGTM complains about the unused variable in a loop that is really only using the variable to iterate a set number of times. This replaces that loop with a multiplication by the length of the array, eliminating the unused iteration variable and clarifying the intent of the code. --- src/Mod/Arch/exportIFC.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Arch/exportIFC.py b/src/Mod/Arch/exportIFC.py index 292655656a..3043103f40 100644 --- a/src/Mod/Arch/exportIFC.py +++ b/src/Mod/Arch/exportIFC.py @@ -2261,7 +2261,7 @@ def getRepresentation(ifcfile,context,obj,forcebrep=False,subtraction=False,tess diffusecolor = obj.ViewObject.DiffuseColor if shapecolor and (shapetype != "clone"): # cloned objects are already colored key = None - rgbt = [shapecolor+(transparency,) for shape in shapes] + rgbt = [shapecolor+(transparency,)] * len(shapes) if diffusecolor \ and (len(diffusecolor) == len(obj.Shape.Faces)) \ and (len(obj.Shape.Solids) == len(colorshapes)):