LGTM: remove unnecessary 'pass' statements
Issue: A pass statement is only necessary when it is the only statement in a block (the list of statements forming part of a compound statement). This is because the purpose of the pass statement is to allow empty blocks where they would otherwise be syntactically invalid. If the block already contains other statements then the pass statement is unnecessary. Recommendation: Remove the pass statement. Relevant links:1a82a5e136/files/src/Mod/Import/stepZ.py (x78f479c31a062553):11a82a5e136/files/src/Mod/OpenSCAD/OpenSCADCommands.py (xad4868ffcdf82498):11a82a5e136/files/src/App/FreeCADInit.py (x9034ec6815c48e38):1
This commit is contained in:
@@ -105,7 +105,6 @@ def import_stpz(fn,fc,doc):
|
||||
os.remove(tempfilepath)
|
||||
except OSError:
|
||||
sayzerr("error on removing "+tempfilepath+" file")
|
||||
pass
|
||||
###
|
||||
|
||||
def open(filename,doc=None):
|
||||
|
||||
Reference in New Issue
Block a user