LGTM: various fixes for using string operator instead of numeric

This commit is contained in:
luz.paz
2019-10-22 10:42:18 -04:00
committed by Yorik van Havre
parent e4c8890d52
commit 1bc33025d6
23 changed files with 49 additions and 54 deletions

View File

@@ -56,10 +56,9 @@ class DistanceBolt:
def makeDistanceBolt():
doc = FreeCAD.activeDocument()
if doc == None:
if doc is None:
doc = FreeCAD.newDocument()
bolt=doc.addObject("Part::FeaturePython","Distance_Bolt")
bolt.Label = "Distance bolt"
DistanceBolt(bolt)
bolt.ViewObject.Proxy=0

View File

@@ -57,7 +57,7 @@ class Epitrochoid:
def makeEpitrochoid():
doc = FreeCAD.activeDocument()
if doc == None:
if doc is None:
doc = FreeCAD.newDocument()
epitrochoid=doc.addObject("Part::FeaturePython","Epitrochoid") #add object to document
epitrochoid.Label = "Epitrochoid"

View File

@@ -17,8 +17,8 @@ def proceed():
def compute():
QtGui.QApplication.setOverrideCursor(QtCore.Qt.WaitCursor)
if FreeCAD.ActiveDocument==None:
if FreeCAD.ActiveDocument is None:
FreeCAD.newDocument("Gear")
oldDocumentObjects=App.ActiveDocument.Objects

View File

@@ -64,7 +64,7 @@ class BoxCylinder:
def makeParallelepiped():
doc = FreeCAD.activeDocument()
if doc == None:
if doc is None:
doc = FreeCAD.newDocument()
obj=doc.addObject("Part::FeaturePython","Parallelepiped")
obj.Label = "Parallelepiped"
@@ -74,7 +74,7 @@ def makeParallelepiped():
def makeBoxCylinder():
doc = FreeCAD.activeDocument()
if doc == None:
if doc is None:
doc = FreeCAD.newDocument()
cyl=doc.addObject("Part::Cylinder","Cylinder")
cyl.Radius=16.0

View File

@@ -39,7 +39,7 @@ class MySpring:
def makeMySpring():
doc = FreeCAD.activeDocument()
if doc == None:
if doc is None:
doc = FreeCAD.newDocument()
spring=doc.addObject("Part::FeaturePython","My_Spring")
spring.Label = "My Spring"