Addressed pylint warnings for PathDressups

This commit is contained in:
Markus Lampert
2019-06-30 15:24:12 -07:00
parent 35505b451a
commit 7219f6446d
4 changed files with 53 additions and 31 deletions

View File

@@ -60,6 +60,15 @@ class ObjectDressup:
obj.Proxy = self
self.setEditorProperties(obj)
# initialized later
self.wire = None
self.angle = None
self.rapids = None
self.method = None
self.outedges = None
self.ignoreAboveEnabled = None
self.ignoreAbove = None
def __getstate__(self):
return None
@@ -366,6 +375,7 @@ class ObjectDressup:
curPoint = p0 # start from the upper point of plunge
done = False
goingForward = True
i = 0
while not done:
for i, redge in enumerate(rampedges):
if redge.Length >= rampremaining:
@@ -432,6 +442,7 @@ class ObjectDressup:
curPoint = p0 # start from the upper point of plunge
done = False
i = 0
while not done:
for i, redge in enumerate(rampedges):
if redge.Length >= rampremaining:
@@ -621,7 +632,7 @@ class ObjectDressup:
class ViewProviderDressup:
def __init__(self, vobj):
vobj.Proxy = self
self.obj = vobj.Object
def attach(self, vobj):
self.obj = vobj.Object
@@ -640,8 +651,9 @@ class ViewProviderDressup:
return [self.obj.Base]
def onDelete(self, arg1=None, arg2=None):
PathLog.debug("Deleting Dressup")
'''this makes sure that the base operation is added back to the project and visible'''
# pylint: disable=unused-argument
PathLog.debug("Deleting Dressup")
FreeCADGui.ActiveDocument.getObject(arg1.Object.Base.Name).Visibility = True
job = PathUtils.findParentJob(self.obj)
job.Proxy.addOperation(arg1.Object.Base, arg1.Object)
@@ -656,6 +668,7 @@ class ViewProviderDressup:
class CommandPathDressupRampEntry:
# pylint: disable=no-init
def GetResources(self):
return {'Pixmap': 'Path-Dressup',
@@ -693,7 +706,7 @@ class CommandPathDressupRampEntry:
FreeCADGui.doCommand('job = PathScripts.PathUtils.findParentJob(base)')
FreeCADGui.doCommand('obj.Base = base')
FreeCADGui.doCommand('job.Proxy.addOperation(obj, base)')
FreeCADGui.doCommand('PathScripts.PathDressupRampEntry.ViewProviderDressup(obj.ViewObject)')
FreeCADGui.doCommand('obj.ViewObject.Proxy = PathScripts.PathDressupRampEntry.ViewProviderDressup(obj.ViewObject)')
FreeCADGui.doCommand('Gui.ActiveDocument.getObject(base.Name).Visibility = False')
FreeCADGui.doCommand('dbo.setup(obj)')
FreeCAD.ActiveDocument.commitTransaction()