[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.
This commit is contained in:
Chris Hennes
2021-02-28 23:42:14 -06:00
parent c7c420ca1d
commit ac4b02f5a0

View File

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