Skip to content

Commit

Permalink
Fix trailing whitespace, typos, headers
Browse files Browse the repository at this point in the history
Fix trailing whitespace, typos, and header uniformity.
  • Loading branch information
luzpaz authored and donovaly committed Jan 22, 2023
1 parent d6cccf2 commit 7296853
Show file tree
Hide file tree
Showing 48 changed files with 180 additions and 189 deletions.
4 changes: 2 additions & 2 deletions package/fedora/freecad.spec
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ Requires: python3-matplotlib
Requires: python3-pivy
Requires: python3-pyside2
Requires: qt5-assistant
%if %{bundled_smesh}
%if %{bundled_smesh}
Provides: bundled(smesh) = %{bundled_smesh_version}
%endif
%if %{bundled_pycxx}
%if %{bundled_pycxx}
Provides: bundled(python-pycxx)
%endif
Recommends: python3-pysolar
Expand Down
18 changes: 9 additions & 9 deletions src/Base/CoordinateSystemPy.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
<PythonExport
Father="PyObjectBase"
Name="CoordinateSystemPy"
Twin="CoordinateSystem"
TwinPointer="CoordinateSystem"
Include="Base/CoordinateSystem.h"
FatherInclude="Base/PyObjectBase.h"
Namespace="Base"
<PythonExport
Father="PyObjectBase"
Name="CoordinateSystemPy"
Twin="CoordinateSystem"
TwinPointer="CoordinateSystem"
Include="Base/CoordinateSystem.h"
FatherInclude="Base/PyObjectBase.h"
Namespace="Base"
Constructor="true"
Delete="true"
Delete="true"
FatherNamespace="Base">
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="[email protected]" />
Expand Down
4 changes: 2 additions & 2 deletions src/Base/Quantity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,8 @@ Quantity Quantity::MegaNewton (1e+9 ,Unit(1,1,-2));

Quantity Quantity::NewtonPerMeter (1.00 ,Unit(0,1,-2)); //Newton per meter (N/m or kg/s^2)
Quantity Quantity::MilliNewtonPerMeter (1e-3 ,Unit(0,1,-2));
Quantity Quantity::KiloNewtonPerMeter (1e3 ,Unit(0,1,-2));
Quantity Quantity::MegaNewtonPerMeter (1e6 ,Unit(0,1,-2));
Quantity Quantity::KiloNewtonPerMeter (1e3 ,Unit(0,1,-2));
Quantity Quantity::MegaNewtonPerMeter (1e6 ,Unit(0,1,-2));

Quantity Quantity::Pascal (0.001 ,Unit(-1,1,-2)); // Pascal (kg/m/s^2 or N/m^2)
Quantity Quantity::KiloPascal (1.00 ,Unit(-1,1,-2));
Expand Down
2 changes: 1 addition & 1 deletion src/Base/RotationPy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ z : float
w : float\n
Rotation(dir1, dir2, dir3, seq)
Define from three vectors that define rotated axes directions plus an optional
3-characher string of capital letters 'X', 'Y', 'Z' that sets the order of
3-characher string of capital letters 'X', 'Y', 'Z' that sets the order of
importance of the axes (e.g., 'ZXY' means z direction is followed strictly,
x is used but corrected if necessary, y is ignored).
dir1 : Base.Vector
Expand Down
2 changes: 1 addition & 1 deletion src/Ext/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# this directory is the entry point for namespace modules. Any package
# installed to a directory "freecad" which is in sys.path can be imported
# with "from freecad import package" and is checked for a init_gui.py
# with "from freecad import package" and is checked for a init_gui.py
# module, which is imported at startup. (FreeCADGuiInit.py)

add_subdirectory(freecad)
2 changes: 1 addition & 1 deletion src/Ext/freecad/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c
EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c
"from distutils.sysconfig import get_python_lib; print(get_python_lib(plat_specific=True))"
OUTPUT_VARIABLE python_libs OUTPUT_STRIP_TRAILING_WHITESPACE )
SET(PYTHON_MAIN_DIR ${python_libs})
Expand Down
2 changes: 1 addition & 1 deletion src/Ext/freecad/UiTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class QUiLoader(QtUiTools.QUiLoader):
def __init__(self, arg = None):
super(QUiLoader, self).__init__(arg)
self.ui = Gui.PySideUic

def createWidget(self, className, parent = None, name = ""):
widget = self.ui.createCustomWidget(className, parent, name)
if not widget:
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/Language/Translator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ using namespace Gui;
* Q_INIT_RESOURCE(resource);
*
* \endcode
*
*
* where \a resource is the name of the .qrc file. That's all!
*/

Expand Down
6 changes: 3 additions & 3 deletions src/Gui/Language/translation.qrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<RCC>
<qresource prefix="/translations">
<qresource prefix="/translations">
<file>qt_de.qm</file>
<file>qt_es-ES.qm</file>
<file>qt_fr.qm</file>
Expand Down Expand Up @@ -65,6 +65,6 @@
<file>FreeCAD_ka.qm</file>
<file>FreeCAD_sr-CS.qm</file>
<file>FreeCAD_be.qm</file>

</qresource>
</RCC>
</RCC>
2 changes: 1 addition & 1 deletion src/Gui/TreeParams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class TreeParamsP: public ParameterGrp::ObserverType {
if(it == funcs.end())
return;
it->second(this);

}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def run(self):
sleep(0.01)
self.limit_reached = True
worker = Worker()
self.factory.work_function = worker.run
self.factory.work_function = worker.run
self.test_object.run()
cancel_timer = QtCore.QTimer()
cancel_timer.timeout.connect(
Expand Down
8 changes: 4 additions & 4 deletions src/Mod/AddonManager/addonmanager_installer_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ def run(self):

# Dependency check
deps = MissingDependencies(self.addon_to_install, self.addons)

# Python interpreter version check
stop_installation = self._check_python_version(deps)
if stop_installation:
self.finished.emit()
return

# Required Python
if hasattr(deps, "python_requires") and deps.python_requires:
# Disallowed packages:
Expand All @@ -107,7 +107,7 @@ def run(self):
# Remove any disallowed packages from the optional list
if hasattr(deps, "python_optional") and deps.python_optional:
self._clean_up_optional(deps)

# Missing FreeCAD workbenches
if hasattr(deps, "wbs") and deps.wbs:
stop_installation = self._report_missing_workbenches(deps.wbs)
Expand Down Expand Up @@ -529,7 +529,7 @@ def __init__(self, addon: object):
"User parameter:BaseApp/Workbench/Global/Toolbar"
)
self.macro_dir = FreeCAD.getUserMacroDir(True)

def __del__(self):
if self.worker_thread and hasattr(self.worker_thread, "quit"):
self.worker_thread.quit()
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Arch/importIFC.py
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,7 @@ def insert(srcfile, docname, skip=[], only=[], root=None, preferences=None):
"DiffuseColor" not in added_mat.Material
and "DiffuseColor" not in mdict
) # there is no color in added mat with the same matname and new mat
# on modell imported from ArchiCAD color was not found for all IFC material objects,
# on model imported from ArchiCAD color was not found for all IFC material objects,
# thus DiffuseColor was not set for created materials, workaround to merge these too
):
matobj = added_mat
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Fem/Gui/Resources/Fem.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -177,4 +177,4 @@
<file>ui/ResultShow.ui</file>
<file>ui/SolverCalculix.ui</file>
</qresource>
</RCC>
</RCC>
4 changes: 2 additions & 2 deletions src/Mod/Fem/Gui/ViewProviderFemPostPipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ void ViewProviderFemPostPipeline::onSelectionChanged(const Gui::SelectionChanges

void ViewProviderFemPostPipeline::updateColorBars()
{

// take all visible childs and update its shape coloring
auto children = claimChildren();
for (auto& child : children) {
Expand All @@ -155,7 +155,7 @@ void ViewProviderFemPostPipeline::transformField(char *FieldName, double FieldFa
vtkSmartPointer<vtkDataObject> data = obj->Data.getValue();
if (!data || !data->IsA("vtkDataSet"))
return;

vtkDataSet *dset = vtkDataSet::SafeDownCast(data);
vtkDataArray *pdata = dset->GetPointData()->GetArray(FieldName);
if (!pdata)
Expand Down
Loading

0 comments on commit 7296853

Please sign in to comment.