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:
luz paz
2022-05-05 14:30:39 -04:00
committed by Uwe
parent 3d7eb87a4c
commit a94d76874f
2 changed files with 0 additions and 3 deletions

View File

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

View File

@@ -332,8 +332,6 @@ def parse(filename, doc):
float(c[2])/255,
float(c[3])/255)
del color
def decodeName(name):
"""Decode encoded name.