Skip to content

Commit

Permalink
Addressed pylint warnings for PathProfileFaces
Browse files Browse the repository at this point in the history
  • Loading branch information
mlampert committed Jul 1, 2019
1 parent 68f839d commit 71994e5
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/Mod/Path/PathScripts/PathProfileFaces.py
Expand Up @@ -110,10 +110,7 @@ def areaOpShapes(self, obj):
self.commandlist.append(Path.Command("(Uncompensated Tool Path)"))

shapes = []
self.profileshape = []
finalDepths = []
startDepths = []
faceDepths = []
self.profileshape = [] # pylint: disable=attribute-defined-outside-init

baseSubsTuples = []
subCount = 0
Expand All @@ -129,13 +126,13 @@ def areaOpShapes(self, obj):
if isinstance(shape, Part.Face):
rtn = False
(norm, surf) = self.getFaceNormAndSurf(shape)
(rtn, angle, axis, praInfo) = self.faceRotationAnalysis(obj, norm, surf)
(rtn, angle, axis, praInfo) = self.faceRotationAnalysis(obj, norm, surf) # pylint: disable=unused-variable
if rtn is True:
(clnBase, angle, clnStock, tag) = self.applyRotationalAnalysis(obj, base, angle, axis, subCount)
# Verify faces are correctly oriented - InverseAngle might be necessary
faceIA = getattr(clnBase.Shape, sub)
(norm, surf) = self.getFaceNormAndSurf(faceIA)
(rtn, praAngle, praAxis, praInfo) = self.faceRotationAnalysis(obj, norm, surf)
(rtn, praAngle, praAxis, praInfo) = self.faceRotationAnalysis(obj, norm, surf) # pylint: disable=unused-variable
if rtn is True:
PathLog.error(translate("Path", "Face appears misaligned after initial rotation."))
if obj.AttemptInverseAngle is True and obj.InverseAngle is False:
Expand Down Expand Up @@ -207,7 +204,7 @@ def areaOpShapes(self, obj):
startDepths.append(strDep)

# Recalculate depthparams
self.depthparams = PathUtils.depth_params(
self.depthparams = PathUtils.depth_params( # pylint: disable=attribute-defined-outside-init
clearance_height=obj.ClearanceHeight.Value,
safe_height=obj.SafeHeight.Value,
start_depth=strDep, # obj.StartDepth.Value,
Expand Down Expand Up @@ -235,7 +232,7 @@ def areaOpShapes(self, obj):
PathLog.track()
try:
env = PathUtils.getEnvelope(base.Shape, subshape=profileshape, depthparams=self.depthparams)
except Exception:
except Exception: # pylint: disable=broad-except
# PathUtils.getEnvelope() failed to return an object.
PathLog.error(translate('Path', 'Unable to create path for face(s).'))
else:
Expand Down Expand Up @@ -291,7 +288,7 @@ def areaOpShapes(self, obj):
tup = env, False, 'pathProfileFaces', 0.0, 'X', obj.StartDepth.Value, obj.FinalDepth.Value
shapes.append(tup)

self.removalshapes = shapes
self.removalshapes = shapes # pylint: disable=attribute-defined-outside-init
PathLog.debug("%d shapes" % len(shapes))

return shapes
Expand Down

0 comments on commit 71994e5

Please sign in to comment.