Merge pull request #7599 from sliptonic/codespell
fix codespell warnings
This commit is contained in:
@@ -76,17 +76,17 @@ class TaskPanel:
|
||||
self.formPoint.buttonBox.accepted.connect(self.pointAccept)
|
||||
self.formPoint.buttonBox.rejected.connect(self.pointReject)
|
||||
|
||||
self.formPoint.globalX.editingFinished.connect(self.updatePoint)
|
||||
self.formPoint.globalY.editingFinished.connect(self.updatePoint)
|
||||
self.formPoint.globalZ.editingFinished.connect(self.updatePoint)
|
||||
self.formPoint.XGlobal.editingFinished.connect(self.updatePoint)
|
||||
self.formPoint.YGlobal.editingFinished.connect(self.updatePoint)
|
||||
self.formPoint.ZGlobal.editingFinished.connect(self.updatePoint)
|
||||
|
||||
self.formPoint.globalX.setProperty(
|
||||
self.formPoint.XGlobal.setProperty(
|
||||
"unit", FreeCAD.Units.MilliMetre.getUserPreferred()[2]
|
||||
)
|
||||
self.formPoint.globalY.setProperty(
|
||||
self.formPoint.YGlobal.setProperty(
|
||||
"unit", FreeCAD.Units.MilliMetre.getUserPreferred()[2]
|
||||
)
|
||||
self.formPoint.globalZ.setProperty(
|
||||
self.formPoint.ZGlobal.setProperty(
|
||||
"unit", FreeCAD.Units.MilliMetre.getUserPreferred()[2]
|
||||
)
|
||||
|
||||
@@ -123,11 +123,11 @@ class TaskPanel:
|
||||
|
||||
def displayPoint(p):
|
||||
self.point = p
|
||||
self.formPoint.globalX.setProperty("rawValue", p.x)
|
||||
self.formPoint.globalY.setProperty("rawValue", p.y)
|
||||
self.formPoint.globalZ.setProperty("rawValue", p.z)
|
||||
self.formPoint.globalX.setFocus()
|
||||
self.formPoint.globalX.selectAll()
|
||||
self.formPoint.XGlobal.setProperty("rawValue", p.x)
|
||||
self.formPoint.YGlobal.setProperty("rawValue", p.y)
|
||||
self.formPoint.ZGlobal.setProperty("rawValue", p.z)
|
||||
self.formPoint.XGlobal.setFocus()
|
||||
self.formPoint.XGlobal.selectAll()
|
||||
|
||||
def mouseMove(cb):
|
||||
p = None
|
||||
@@ -256,7 +256,7 @@ class TaskPanel:
|
||||
if usePoint and self.point:
|
||||
self.pt = self.point
|
||||
else:
|
||||
x = FreeCAD.Units.Quantity(self.formPoint.globalX.text()).Value
|
||||
y = FreeCAD.Units.Quantity(self.formPoint.globalY.text()).Value
|
||||
z = FreeCAD.Units.Quantity(self.formPoint.globalZ.text()).Value
|
||||
x = FreeCAD.Units.Quantity(self.formPoint.XGlobal.text()).Value
|
||||
y = FreeCAD.Units.Quantity(self.formPoint.YGlobal.text()).Value
|
||||
z = FreeCAD.Units.Quantity(self.formPoint.ZGlobal.text()).Value
|
||||
self.pt = FreeCAD.Vector(x, y, z)
|
||||
|
||||
@@ -367,21 +367,21 @@ class TaskPanel(object):
|
||||
row = index.row()
|
||||
|
||||
obj = self.model.item(row, self.ColumnVal).data(Delegate.RoleObject)
|
||||
nam = self.model.item(row, self.ColumnVal).data(Delegate.RoleProperty)
|
||||
grp = obj.getGroupOfProperty(nam)
|
||||
typ = obj.getTypeIdOfProperty(nam)
|
||||
prop = self.model.item(row, self.ColumnVal).data(Delegate.RoleProperty)
|
||||
grp = obj.getGroupOfProperty(prop)
|
||||
typ = obj.getTypeIdOfProperty(prop)
|
||||
|
||||
dialog = PropertyCreate(self.obj, grp, typ, False)
|
||||
if dialog.exec_(nam):
|
||||
val = getattr(obj, nam)
|
||||
obj.removeProperty(nam)
|
||||
if dialog.exec_(prop):
|
||||
val = getattr(obj, prop)
|
||||
obj.removeProperty(prop)
|
||||
name, info = self.addCustomProperty(self.obj, dialog)
|
||||
try:
|
||||
setattr(obj, nam, val)
|
||||
setattr(obj, prop, val)
|
||||
except Exception:
|
||||
# this can happen if the old enumeration value doesn't exist anymore
|
||||
pass
|
||||
newVal = PathUtil.getPropertyValueString(obj, nam)
|
||||
newVal = PathUtil.getPropertyValueString(obj, prop)
|
||||
self.model.setData(
|
||||
self.model.index(row, self.ColumnVal), newVal, QtCore.Qt.DisplayRole
|
||||
)
|
||||
|
||||
@@ -1092,13 +1092,13 @@ class ObjectProfile(PathAreaOp.ObjectOp):
|
||||
V1 = FreeCAD.Vector(VV1.X, VV1.Y, VV1.Z)
|
||||
V2 = FreeCAD.Vector(VV2.X, VV2.Y, VV2.Z)
|
||||
|
||||
lenE = len(wire.Edges)
|
||||
edgeCount = len(wire.Edges)
|
||||
FLGS = []
|
||||
for e in range(0, lenE):
|
||||
for e in range(0, edgeCount):
|
||||
FLGS.append(0)
|
||||
|
||||
chk4 = False
|
||||
for e in range(0, lenE):
|
||||
for e in range(0, edgeCount):
|
||||
v = 0
|
||||
E = wire.Edges[e]
|
||||
fv0 = FreeCAD.Vector(E.Vertexes[0].X, E.Vertexes[0].Y, E.Vertexes[0].Z)
|
||||
@@ -1135,7 +1135,7 @@ class ObjectProfile(PathAreaOp.ObjectOp):
|
||||
IDXS = []
|
||||
IDX1 = []
|
||||
IDX2 = []
|
||||
for e in range(0, lenE):
|
||||
for e in range(0, edgeCount):
|
||||
f = FLGS[e]
|
||||
PRE.append(f)
|
||||
POST.append(f)
|
||||
@@ -1161,7 +1161,7 @@ class ObjectProfile(PathAreaOp.ObjectOp):
|
||||
wireIdxs[0].append(i)
|
||||
break
|
||||
# find first 3 edge
|
||||
for e in range(begIdx + 1, lenE + begIdx):
|
||||
for e in range(begIdx + 1, edgeCount + begIdx):
|
||||
f = PRE[e]
|
||||
i = IDXS[e]
|
||||
grps[1].append(f)
|
||||
@@ -1180,7 +1180,7 @@ class ObjectProfile(PathAreaOp.ObjectOp):
|
||||
break
|
||||
# find first 3 edge and group all first wire edges
|
||||
endIdx = None
|
||||
for e in range(begIdx, lenE + begIdx):
|
||||
for e in range(begIdx, edgeCount + begIdx):
|
||||
f = PRE[e]
|
||||
i = IDXS[e]
|
||||
if f == 3:
|
||||
|
||||
@@ -29,7 +29,7 @@ import Path.Main.Job as PathJob
|
||||
from PathTests.PathTestUtils import PathTestBase
|
||||
|
||||
if FreeCAD.GuiUp:
|
||||
import Path.Main.gui.Job as PathJobGui
|
||||
import Path.Main.Gui.Job as PathJobGui
|
||||
import Path.Op.Gui.Adaptive as PathAdaptiveGui
|
||||
|
||||
|
||||
|
||||
@@ -42,8 +42,8 @@ class TestFeature:
|
||||
def __init__(self):
|
||||
self.Path = Path.Path()
|
||||
|
||||
def addProperty(self, typ, nam, category, tip):
|
||||
setattr(self, nam, None)
|
||||
def addProperty(self, typ, name, category, tip):
|
||||
setattr(self, name, None)
|
||||
|
||||
def setEditorMode(self, prop, mode):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user