LGTM: Remove unnecessary deletion of local variables
Passing a local variable to a del statement results in that variable being removed from the local namespace. When exiting a function all local variables are deleted, so it is unnecessary to explicitly delete variables in such cases. ref: https://lgtm.com/rules/1506104658325/
This commit is contained in:
@@ -2721,7 +2721,6 @@ def processdxf(document, filename, getShapes=False, reComputeFlag=True):
|
||||
if badobjects:
|
||||
print("dxf: ", len(badobjects), " objects were not imported")
|
||||
del doc
|
||||
del blockshapes
|
||||
|
||||
|
||||
def warn(dxfobject, num=None):
|
||||
|
||||
@@ -332,8 +332,6 @@ def parse(filename, doc):
|
||||
float(c[2])/255,
|
||||
float(c[3])/255)
|
||||
|
||||
del color
|
||||
|
||||
|
||||
def decodeName(name):
|
||||
"""Decode encoded name.
|
||||
|
||||
Reference in New Issue
Block a user