[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:
@@ -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)):
|
||||
|
||||
Reference in New Issue
Block a user