Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix typos and some trailing whitespace
Found via:  
```
codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,currenty,dof,doubleclick,dum,eiter,elemente,feld,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml
```
  • Loading branch information
luzpaz authored and berndhahnebach committed Dec 3, 2019
1 parent e583b2a commit 379d041
Show file tree
Hide file tree
Showing 18 changed files with 182 additions and 186 deletions.
114 changes: 57 additions & 57 deletions src/App/Expression.cpp

Large diffs are not rendered by default.

74 changes: 36 additions & 38 deletions src/Gui/PythonWorkbenchPyImp.cpp
Expand Up @@ -32,8 +32,8 @@
using namespace Gui;

/** @class PythonWorkbenchPy
* The workbench Python class provides additional methods for manipulation of python worbench
* objects.
* The workbench Python class provides additional methods for manipulation of python
* workbench objects.
* From the view of Python PythonWorkbenchPy is also derived from WorkbenchPy as in C++.
* @see Workbench
* @see WorkbenchPy
Expand All @@ -54,7 +54,7 @@ PyObject* PythonWorkbenchPy::appendMenu(PyObject *args)
PyObject* pPath;
PyObject* pItems;
if ( !PyArg_ParseTuple(args, "OO", &pPath, &pItems) )
return NULL; // NULL triggers exception
return NULL; // NULL triggers exception

// menu path
std::list<std::string> path;
Expand Down Expand Up @@ -95,7 +95,7 @@ PyObject* PythonWorkbenchPy::appendMenu(PyObject *args)
#endif
} else {
PyErr_SetString(PyExc_AssertionError, "Expected either a string or a stringlist as first argument");
return NULL; // NULL triggers exception
return NULL; // NULL triggers exception
}

// menu items
Expand Down Expand Up @@ -137,12 +137,12 @@ PyObject* PythonWorkbenchPy::appendMenu(PyObject *args)
#endif
} else {
PyErr_SetString(PyExc_AssertionError, "Expected either a string or a stringlist as first argument");
return NULL; // NULL triggers exception
return NULL; // NULL triggers exception
}

getPythonBaseWorkbenchPtr()->appendMenu( path, items );

Py_Return;
Py_Return;
} PY_CATCH;
}

Expand All @@ -151,11 +151,11 @@ PyObject* PythonWorkbenchPy::removeMenu(PyObject *args)
{
PY_TRY {
char *psMenu;
if (!PyArg_ParseTuple(args, "s", &psMenu)) // convert args: Python->C
return NULL; // NULL triggers exception
if (!PyArg_ParseTuple(args, "s", &psMenu)) // convert args: Python->C
return NULL; // NULL triggers exception

getPythonBaseWorkbenchPtr()->removeMenu( psMenu );
Py_Return;
Py_Return;
} PY_CATCH;
}

Expand All @@ -178,7 +178,7 @@ PyObject* PythonWorkbenchPy::listMenus(PyObject *args)
#endif
PyList_SetItem(pyList, i, str);
}
return pyList;
return pyList;
} PY_CATCH;
}

Expand All @@ -189,7 +189,7 @@ PyObject* PythonWorkbenchPy::appendContextMenu(PyObject *args)
PyObject* pPath;
PyObject* pItems;
if ( !PyArg_ParseTuple(args, "OO", &pPath, &pItems) )
return NULL; // NULL triggers exception
return NULL; // NULL triggers exception

// menu path
std::list<std::string> path;
Expand Down Expand Up @@ -230,7 +230,7 @@ PyObject* PythonWorkbenchPy::appendContextMenu(PyObject *args)
#endif
} else {
PyErr_SetString(PyExc_AssertionError, "Expected either a string or a stringlist as first argument");
return NULL; // NULL triggers exception
return NULL; // NULL triggers exception
}

// menu items
Expand Down Expand Up @@ -272,12 +272,12 @@ PyObject* PythonWorkbenchPy::appendContextMenu(PyObject *args)
#endif
} else {
PyErr_SetString(PyExc_AssertionError, "Expected either a string or a stringlist as first argument");
return NULL; // NULL triggers exception
return NULL; // NULL triggers exception
}

getPythonBaseWorkbenchPtr()->appendContextMenu( path, items );

Py_Return;
Py_Return;
} PY_CATCH;
}

Expand All @@ -286,11 +286,11 @@ PyObject* PythonWorkbenchPy::removeContextMenu(PyObject *args)
{
PY_TRY {
char *psMenu;
if (!PyArg_ParseTuple(args, "s", &psMenu)) // convert args: Python->C
return NULL; // NULL triggers exception
if (!PyArg_ParseTuple(args, "s", &psMenu)) // convert args: Python->C
return NULL; // NULL triggers exception

getPythonBaseWorkbenchPtr()->removeContextMenu( psMenu );
Py_Return;
Py_Return;
} PY_CATCH;
}

Expand All @@ -301,10 +301,10 @@ PyObject* PythonWorkbenchPy::appendToolbar(PyObject *args)
PyObject* pObject;
char* psToolBar;
if ( !PyArg_ParseTuple(args, "sO", &psToolBar, &pObject) )
return NULL; // NULL triggers exception
return NULL; // NULL triggers exception
if (!PyList_Check(pObject)) {
PyErr_SetString(PyExc_AssertionError, "Expected a list as second argument");
return NULL; // NULL triggers exception
return NULL; // NULL triggers exception
}

std::list<std::string> items;
Expand All @@ -330,7 +330,7 @@ PyObject* PythonWorkbenchPy::appendToolbar(PyObject *args)
}
getPythonBaseWorkbenchPtr()->appendToolbar( psToolBar, items );

Py_Return;
Py_Return;
} PY_CATCH;
}

Expand All @@ -339,11 +339,11 @@ PyObject* PythonWorkbenchPy::removeToolbar(PyObject *args)
{
PY_TRY {
char *psToolBar;
if (!PyArg_ParseTuple(args, "s", &psToolBar)) // convert args: Python->C
return NULL; // NULL triggers exception
if (!PyArg_ParseTuple(args, "s", &psToolBar)) // convert args: Python->C
return NULL; // NULL triggers exception

getPythonBaseWorkbenchPtr()->removeToolbar( psToolBar );
Py_Return;
Py_Return;
} PY_CATCH;
}

Expand All @@ -366,7 +366,7 @@ PyObject* PythonWorkbenchPy::listToolbars(PyObject *args)
#endif
PyList_SetItem(pyList, i, str);
}
return pyList;
return pyList;
} PY_CATCH;
}

Expand All @@ -377,10 +377,10 @@ PyObject* PythonWorkbenchPy::appendCommandbar(PyObject *args)
PyObject* pObject;
char* psToolBar;
if ( !PyArg_ParseTuple(args, "sO", &psToolBar, &pObject) )
return NULL; // NULL triggers exception
return NULL; // NULL triggers exception
if (!PyList_Check(pObject)) {
PyErr_SetString(PyExc_AssertionError, "Expected a list as second argument");
return NULL; // NULL triggers exception
return NULL; // NULL triggers exception
}

std::list<std::string> items;
Expand All @@ -407,7 +407,7 @@ PyObject* PythonWorkbenchPy::appendCommandbar(PyObject *args)

getPythonBaseWorkbenchPtr()->appendCommandbar( psToolBar, items );

Py_Return;
Py_Return;
} PY_CATCH;
}

Expand All @@ -416,11 +416,11 @@ PyObject* PythonWorkbenchPy::removeCommandbar(PyObject *args)
{
PY_TRY {
char *psToolBar;
if (!PyArg_ParseTuple(args, "s", &psToolBar)) // convert args: Python->C
return NULL; // NULL triggers exception
if (!PyArg_ParseTuple(args, "s", &psToolBar)) // convert args: Python->C
return NULL; // NULL triggers exception

getPythonBaseWorkbenchPtr()->removeCommandbar( psToolBar );
Py_Return;
Py_Return;
} PY_CATCH;
}

Expand All @@ -443,7 +443,7 @@ PyObject* PythonWorkbenchPy::listCommandbars(PyObject *args)
#endif
PyList_SetItem(pyList, i, str);
}
return pyList;
return pyList;
} PY_CATCH;
}

Expand All @@ -454,7 +454,7 @@ PyObject *PythonWorkbenchPy::getCustomAttributes(const char* ) const

int PythonWorkbenchPy::setCustomAttributes(const char* , PyObject *)
{
return 0;
return 0;
}

PyObject* PythonWorkbenchPy::AppendMenu(PyObject *args)
Expand Down Expand Up @@ -511,5 +511,3 @@ PyObject* PythonWorkbenchPy::ListCommandbars(PyObject *args)
{
return listCommandbars(args);
}


2 changes: 1 addition & 1 deletion src/Mod/Arch/OfflineRenderingUtils.py
Expand Up @@ -362,7 +362,7 @@ def render(outputfile,scene=None,camera=None,zoom=False,width=400,height=300,bac
def buildScene(objects,colors=None):

"""buildScene(objects,colors=None): builds a coin node from a given list of FreeCAD
objects. Optional colors argument can be a dicionary of objName:ShapeColorTuple
objects. Optional colors argument can be a dictionary of objName:ShapeColorTuple
or obj:DiffuseColorList pairs."""

from pivy import coin
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Arch/importIFCHelper.py
Expand Up @@ -433,7 +433,7 @@ def buildRelProperties(ifcfile):


def getIfcPropertySets(ifcfile, pid):
"""Returns a dicionary of {pset_id:[prop_id, prop_id...]} for an IFC object"""
"""Returns a dictionary of {pset_id:[prop_id, prop_id...]} for an IFC object"""

# get psets for this pid
psets = {}
Expand Down
4 changes: 2 additions & 2 deletions src/Mod/Draft/TestDraft.py
Expand Up @@ -462,7 +462,7 @@ def test_dimension_linear(self):
"""Create a linear dimension."""
operation = "Draft Dimension"
_msg(" Test '{}'".format(operation))
_msg(" Occasionaly crashes")
_msg(" Occasionally crashes")
a = Vector(0, 0, 0)
b = Vector(9, 0, 0)
c = Vector(4, -1, 0)
Expand Down Expand Up @@ -577,7 +577,7 @@ def test_label(self):
"""Create a label."""
operation = "Draft Label"
_msg(" Test '{}'".format(operation))
_msg(" Occasionaly crashes")
_msg(" Occasionally crashes")
target_point = Vector(0, 0, 0)
distance = -25
placement = App.Placement(Vector(50, 50, 0), App.Rotation())
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Fem/femtest/app/test_femimport.py
Expand Up @@ -34,7 +34,7 @@ class TestFemImport(unittest.TestCase):

# ********************************************************************************************
# no is document needed to test import Fem and import FemGui
# thus neiter setUp nor tearDown methods are needed
# thus neither setUp nor tearDown methods are needed

def test_00print(
self
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/MeshPart/Gui/Tessellation.cpp
Expand Up @@ -285,7 +285,7 @@ bool Tessellation::accept()
// TODO: currently, we can only retrieve part feature
// color. The problem is that if the feature is linked,
// there are potentially many places where the color can
// get overriden.
// get overridden.
//
// With topo naming feature merged, it will be possible to
// infer more accurate colors from just the shape names,
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Path/App/AreaParams.h
Expand Up @@ -96,7 +96,7 @@

/** Pocket parameters
*
* These parameters cooresponds to CAreaPocketParams in libarea
* These parameters corresponds to CAreaPocketParams in libarea
* */
#define AREA_PARAMS_POCKET \
((enum,mode,PocketMode,0,"Selects the pocket toolpath pattern",\
Expand Down

0 comments on commit 379d041

Please sign in to comment.