From 313525a0120f58514b993b3b5a8b236b80c6498b Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 5 Dec 2022 10:12:49 +0100 Subject: [PATCH] Core: [skip ci] ignore some code spell checks and filter all '_rc_.py' files --- .github/codespellignore | 3 +++ .github/workflows/checks.yml | 2 +- src/App/PropertyPythonObject.cpp | 8 ++++---- src/Base/TypePyImp.cpp | 4 ++-- src/Gui/DlgProjectInformation.ui | 2 +- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/codespellignore b/.github/codespellignore index 8039316551..fa5a17d758 100644 --- a/.github/codespellignore +++ b/.github/codespellignore @@ -7,6 +7,7 @@ alocation anid anormal apoints +aply appy ba beginn @@ -32,6 +33,7 @@ froms hist indicies inout +isnt ist itsel lod @@ -70,5 +72,6 @@ uptodate usind vas vertexes +vew wallthickness zuser \ No newline at end of file diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 0fc5a6872d..b97ec31491 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -54,7 +54,7 @@ env: checkSpelling: true listIgnoredMisspelling: .github/codespellignore - skip: ./.git,*.po,*.ts,*.svg,./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,./build/,./tests/lib + skip: ./.git,*.po,*_rc.py,*.ts,*.svg,./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,./build/,./tests/lib codespellFailSilent: false # Static Analysis diff --git a/src/App/PropertyPythonObject.cpp b/src/App/PropertyPythonObject.cpp index 604368d225..edf46f20c9 100644 --- a/src/App/PropertyPythonObject.cpp +++ b/src/App/PropertyPythonObject.cpp @@ -347,12 +347,12 @@ void PropertyPythonObject::Restore(Base::XMLReader &reader) load_json = true; } else if (boost::regex_search(start, end, what, pickle)) { - std::string nam = std::string(what[1].first, what[1].second); - std::string cls = std::string(what[2].first, what[2].second); - Py::Module mod(PyImport_ImportModule(nam.c_str()),true); + std::string name = std::string(what[1].first, what[1].second); + std::string type = std::string(what[2].first, what[2].second); + Py::Module mod(PyImport_ImportModule(name.c_str()),true); if (mod.isNull()) throw Py::Exception(); - this->object = PyObject_CallObject(mod.getAttr(cls).ptr(), nullptr); + this->object = PyObject_CallObject(mod.getAttr(type).ptr(), nullptr); load_pickle = true; buffer = std::string(what[2].second, end); } diff --git a/src/Base/TypePyImp.cpp b/src/Base/TypePyImp.cpp index 2134d077a8..39267d0a8f 100644 --- a/src/Base/TypePyImp.cpp +++ b/src/Base/TypePyImp.cpp @@ -229,8 +229,8 @@ PyObject* TypePy::createInstanceByName (PyObject *args) if (!PyArg_ParseTuple(args, "s|O!", &name, &PyBool_Type, &load)) return nullptr; - bool bLoad = Base::asBoolean(load); - Base::Type type = Base::Type::getTypeIfDerivedFrom(name, Base::BaseClass::getClassTypeId(), bLoad); + bool loadModule = Base::asBoolean(load); + Base::Type type = Base::Type::getTypeIfDerivedFrom(name, Base::BaseClass::getClassTypeId(), loadModule); if (type.isBad()) Py_Return; diff --git a/src/Gui/DlgProjectInformation.ui b/src/Gui/DlgProjectInformation.ui index 0507b56cf2..679d64a71f 100644 --- a/src/Gui/DlgProjectInformation.ui +++ b/src/Gui/DlgProjectInformation.ui @@ -297,7 +297,7 @@ - Commen&t: + &Comment: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter