Catching new warnings due to merge

This commit is contained in:
Markus Lampert
2019-06-30 20:13:02 -07:00
parent 6410393092
commit 0065ed5d7b
3 changed files with 30 additions and 30 deletions

View File

@@ -187,15 +187,15 @@ class ObjectOp(PathOp.ObjectOp):
baseSubsTuples = []
subCount = 0
allTuples = []
self.cloneNames = []
self.guiMsgs = [] # list of message tuples (title, msg) to be displayed in GUI
self.rotateFlag = False
self.useTempJobClones('Delete') # Clear temporary group and recreate for temp job clones
self.stockBB = PathUtils.findParentJob(obj).Stock.Shape.BoundBox
self.clearHeight = obj.ClearanceHeight.Value
self.safeHeight = obj.SafeHeight.Value
self.axialFeed = 0.0
self.axialRapid = 0.0
self.cloneNames = [] # pylint: disable=attribute-defined-outside-init
self.guiMsgs = [] # pylint: disable=attribute-defined-outside-init
self.rotateFlag = False # pylint: disable=attribute-defined-outside-init
self.useTempJobClones('Delete') # pylint: disable=attribute-defined-outside-init
self.stockBB = PathUtils.findParentJob(obj).Stock.Shape.BoundBox # pylint: disable=attribute-defined-outside-init
self.clearHeight = obj.ClearanceHeight.Value # pylint: disable=attribute-defined-outside-init
self.safeHeight = obj.SafeHeight.Value # pylint: disable=attribute-defined-outside-init
self.axialFeed = 0.0 # pylint: disable=attribute-defined-outside-init
self.axialRapid = 0.0 # pylint: disable=attribute-defined-outside-init
trgtDep = None
def haveLocations(self, obj):
@@ -206,27 +206,27 @@ class ObjectOp(PathOp.ObjectOp):
if obj.EnableRotation == 'Off':
# maxDep = self.stockBB.ZMax
# minDep = self.stockBB.ZMin
self.strDep = obj.StartDepth.Value
self.finDep = obj.FinalDepth.Value
strDep = obj.StartDepth.Value
finDep = obj.FinalDepth.Value
else:
# Calculate operation heights based upon rotation radii
opHeights = self.opDetermineRotationRadii(obj)
(self.xRotRad, self.yRotRad, self.zRotRad) = opHeights[0]
(self.clrOfset, self.safOfst) = opHeights[1]
(self.xRotRad, self.yRotRad, self.zRotRad) = opHeights[0] # pylint: disable=attribute-defined-outside-init
(clrOfset, safOfst) = opHeights[1]
PathLog.debug("Exec. opHeights[0]: " + str(opHeights[0]))
PathLog.debug("Exec. opHeights[1]: " + str(opHeights[1]))
# Set clearnance and safe heights based upon rotation radii
if obj.EnableRotation == 'A(x)':
self.strDep = self.xRotRad
strDep = self.xRotRad
elif obj.EnableRotation == 'B(y)':
self.strDep = self.yRotRad
strDep = self.yRotRad
else:
self.strDep = max(self.xRotRad, self.yRotRad)
self.finDep = -1 * self.strDep
strDep = max(self.xRotRad, self.yRotRad)
finDep = -1 * strDep
obj.ClearanceHeight.Value = self.strDep + self.clrOfset
obj.SafeHeight.Value = self.strDep + self.safOfst
obj.ClearanceHeight.Value = strDep + clrOfset
obj.SafeHeight.Value = strDep + safOfst
# Create visual axises when debugging.
if PathLog.getLevel(PathLog.thisModule()) == 4:
@@ -234,8 +234,8 @@ class ObjectOp(PathOp.ObjectOp):
# Set axial feed rates based upon horizontal feed rates
safeCircum = 2 * math.pi * obj.SafeHeight.Value
self.axialFeed = 360 / safeCircum * self.horizFeed
self.axialRapid = 360 / safeCircum * self.horizRapid
self.axialFeed = 360 / safeCircum * self.horizFeed # pylint: disable=attribute-defined-outside-init
self.axialRapid = 360 / safeCircum * self.horizRapid # pylint: disable=attribute-defined-outside-init
# Complete rotational analysis and temp clone creation as needed
if obj.EnableRotation == 'Off':
@@ -251,14 +251,14 @@ class ObjectOp(PathOp.ObjectOp):
shape = getattr(base.Shape, sub)
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
PathLog.debug("Verifing {} orientation: running faceRotationAnalysis() again.".format(sub))
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:
msg = obj.Name + ":: "
msg += translate("Path", "{} might be misaligned after initial rotation.".format(sub)) + " "
@@ -588,7 +588,7 @@ class ObjectOp(PathOp.ObjectOp):
rtn = False
if angle == 500.0:
angle == 0.0
angle = 0.0
rtn = False
if rtn is False:
@@ -598,7 +598,7 @@ class ObjectOp(PathOp.ObjectOp):
rtn = True
if rtn is True:
self.rotateFlag = True
self.rotateFlag = True # pylint: disable=attribute-defined-outside-init
# rtn = True
if obj.ReverseDirection is True:
if angle < 180.0:
@@ -629,13 +629,13 @@ class ObjectOp(PathOp.ObjectOp):
for entry in self.guiMsgs:
(title, msg) = entry
QMessageBox.warning(None, title, msg)
self.guiMsgs = [] # Reset messages
self.guiMsgs = [] # pylint: disable=attribute-defined-outside-init
return True
else:
for entry in self.guiMsgs:
(title, msg) = entry
PathLog.warning("{}:: {}".format(title, msg))
self.guiMsgs = [] # Reset messages
self.guiMsgs = [] # pylint: disable=attribute-defined-outside-init
return True
return False
@@ -821,7 +821,7 @@ class ObjectOp(PathOp.ObjectOp):
else:
strDep = min(obj.StartDepth.Value, stockTop)
if strDep <= finDep:
strDep = stockTop # self.strDep
strDep = stockTop
msg = translate('Path', "Start depth <= face depth.\nIncreased to stock top.")
PathLog.error(msg)
return (strDep, finDep)

View File

@@ -70,7 +70,6 @@ class ObjectPocket(PathPocketBase.ObjectPocket):
if not hasattr(obj, 'HandleMultipleFeatures'):
obj.addProperty('App::PropertyEnumeration', 'HandleMultipleFeatures', 'Pocket', QtCore.QT_TRANSLATE_NOOP('PathPocket', 'Choose how to process multiple Base Geometry features.'))
obj.HandleMultipleFeatures = ['Collectively', 'Individually']
pass
def opOnDocumentRestored(self, obj):
'''opOnDocumentRestored(obj) ... adds the properties if they doesn't exist.'''

View File

@@ -74,5 +74,6 @@ if [ -z "$(which pylint)" ]; then
fi
#pylint3 ${ARGS} PathScripts/ PathTests/
pylint3 ${ARGS} PathScripts/
#pylint3 ${ARGS} PathScripts/
pylint3 ${ARGS} PathScripts/PathCircu*