From e0fde7ff8c8921e7ac5ae6dd6d3d6b0850d48be2 Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Thu, 5 Sep 2019 07:44:19 +0200 Subject: [PATCH] FEM: solver run and settings, use single quotes instead of double ones --- src/Mod/Fem/femsolver/run.py | 2 +- src/Mod/Fem/femsolver/settings.py | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Mod/Fem/femsolver/run.py b/src/Mod/Fem/femsolver/run.py index c96e6bde6eb0..3d59faddc931 100644 --- a/src/Mod/Fem/femsolver/run.py +++ b/src/Mod/Fem/femsolver/run.py @@ -56,7 +56,7 @@ def run_fem_solver(solver, working_dir=None): - if solver.Proxy.Type == 'Fem::FemSolverCalculixCcxTools': + if solver.Proxy.Type == "Fem::FemSolverCalculixCcxTools": App.Console.PrintMessage("CalxuliX ccx tools solver!\n") from femtools.ccxtools import CcxTools as ccx fea = ccx(solver) diff --git a/src/Mod/Fem/femsolver/settings.py b/src/Mod/Fem/femsolver/settings.py index 9146586b6042..d6b73c5bfd36 100644 --- a/src/Mod/Fem/femsolver/settings.py +++ b/src/Mod/Fem/femsolver/settings.py @@ -27,12 +27,12 @@ ## \addtogroup FEM # @{ -''' +""" parameter in FreeCAD can be edited in two ways, either in the Preferences: menu Edit --> Preferences or Parameter editor: menu Tools --> Edit parameter -''' +""" import FreeCAD @@ -69,13 +69,13 @@ def get_binary(self): # ATM pure unix shell commands without path names are used # TODO see todo on use_default later in this module binary = self.default - FreeCAD.Console.PrintLog('Solver binary path: {} \n'.format(binary)) + FreeCAD.Console.PrintLog("Solver binary path: {} \n".format(binary)) # check if use_default is set to True # if True the standard binary path will be overwritten with a user binary path if self.param_group.GetBool(self.use_default, True) is False: binary = self.param_group.GetString(self.custom_path) - FreeCAD.Console.PrintLog('Solver binary path: {} \n'.format(binary)) + FreeCAD.Console.PrintLog("Solver binary path: {} \n".format(binary)) # get the whole binary path name for the given command or binary path and return it from distutils.spawn import find_executable as find_bin @@ -85,7 +85,7 @@ def get_write_comments(self): return self.param_group.GetBool(self.write_comments, True) -''' +""" default: default command to run the binary this one is taken if the UseStandardXXXLocationis not given or set to True @@ -99,7 +99,7 @@ def get_write_comments(self): custom_path: the xxxBinaryPath parameter identifier binary path given by the user -''' +""" _SOLVER_PARAM = { "Calculix": _SolverDlg( default="ccx", @@ -127,12 +127,12 @@ def get_write_comments(self): def get_binary(name): if name in _SOLVER_PARAM: binary = _SOLVER_PARAM[name].get_binary() - FreeCAD.Console.PrintMessage('Solver binary path: {} \n'.format(binary)) + FreeCAD.Console.PrintMessage("Solver binary path: {} \n".format(binary)) return binary else: FreeCAD.Console.PrintError( - 'Settings solver name: {} not found in ' - 'solver settings modules _SOLVER_PARAM dirctionary.\n' + "Settings solver name: {} not found in " + "solver settings modules _SOLVER_PARAM dirctionary.\n" .format(name) ) return None @@ -143,8 +143,8 @@ def get_write_comments(name): return _SOLVER_PARAM[name].get_write_comments() else: FreeCAD.Console.PrintError( - 'Settings solver name: {} not found in ' - 'solver settings modules _SOLVER_PARAM dirctionary.\n' + "Settings solver name: {} not found in " + "solver settings modules _SOLVER_PARAM dirctionary.\n" .format(name) ) return None