PartDesign: Prepare for clang-format (#16048)
* PartDesign: Prepare for clang-format * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -76,13 +76,15 @@ void loadPartDesignResource()
|
||||
Gui::Translator::instance()->refresh();
|
||||
}
|
||||
|
||||
namespace PartDesignGui {
|
||||
class Module : public Py::ExtensionModule<Module>
|
||||
namespace PartDesignGui
|
||||
{
|
||||
class Module: public Py::ExtensionModule<Module>
|
||||
{
|
||||
public:
|
||||
Module() : Py::ExtensionModule<Module>("PartDesignGui")
|
||||
Module()
|
||||
: Py::ExtensionModule<Module>("PartDesignGui")
|
||||
{
|
||||
initialize("This module is the PartDesignGui module."); // register with Python
|
||||
initialize("This module is the PartDesignGui module."); // register with Python
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -93,7 +95,7 @@ PyObject* initModule()
|
||||
return Base::Interpreter().addModule(new Module);
|
||||
}
|
||||
|
||||
} // namespace PartDesignGui
|
||||
} // namespace PartDesignGui
|
||||
|
||||
|
||||
/* Python entry */
|
||||
@@ -108,7 +110,7 @@ PyMOD_INIT_FUNC(PartDesignGui)
|
||||
Base::Interpreter().runString("import PartGui");
|
||||
Base::Interpreter().runString("import SketcherGui");
|
||||
}
|
||||
catch(const Base::Exception& e) {
|
||||
catch (const Base::Exception& e) {
|
||||
PyErr_SetString(PyExc_ImportError, e.what());
|
||||
PyMOD_Return(nullptr);
|
||||
}
|
||||
@@ -121,6 +123,7 @@ PyMOD_INIT_FUNC(PartDesignGui)
|
||||
CreatePartDesignBodyCommands();
|
||||
CreatePartDesignPrimitiveCommands();
|
||||
|
||||
// clang-format off
|
||||
PartDesignGui::Workbench ::init();
|
||||
PartDesignGui::ViewProvider ::init();
|
||||
PartDesignGui::ViewProviderPython ::init();
|
||||
@@ -158,8 +161,9 @@ PyMOD_INIT_FUNC(PartDesignGui)
|
||||
PartDesignGui::ViewProviderLoft ::init();
|
||||
PartDesignGui::ViewProviderHelix ::init();
|
||||
PartDesignGui::ViewProviderBase ::init();
|
||||
// clang-format on
|
||||
|
||||
// add resources and reloads the translators
|
||||
// add resources and reloads the translators
|
||||
loadPartDesignResource();
|
||||
|
||||
PyMOD_Return(mod);
|
||||
|
||||
Reference in New Issue
Block a user