@@ -62,24 +62,30 @@ def execution_context(engine_label, engine_config, executable):
6262 req_to_check .update (added_req )
6363 else :
6464 if module_name in needed_modules :
65- # Keep the invalid config in order to be able to display explanation
66- # later
67- invalid_needed_configs .setdefault (module_name , {})[module_field ] = module_config
65+ # Keep the invalid config in order to be able to display explanation
66+ # later
67+ invalid_needed_configs .setdefault (module_name , {})[module_field ] = (
68+ module_config
69+ )
6870
6971 # now check we have only one module for each
7072 for module_name in needed_modules :
7173 valid_module_configs = valid_configs .get (module_name )
7274 if valid_module_configs is None :
73- message = f'Execution environment "{ engine_label } " has no ' \
74- f"valid configuration for module { module_name } ."
75-
76- for module_field , module_config in invalid_needed_configs .get (module_name , {}).items ():
75+ message = (
76+ f'Execution environment "{ engine_label } " has no '
77+ f"valid configuration for module { module_name } ."
78+ )
79+
80+ for module_field , module_config in invalid_needed_configs .get (
81+ module_name , {}
82+ ).items ():
7783 # Get explanation about invalid config rejection
7884 explaination = module_config .is_valid_config (requirements , explain = True )
7985 message += f"\n - { module_field .name } is not valid for requirements: { explaination } "
8086
8187 raise RuntimeError (message )
82-
88+
8389 if len (valid_module_configs ) > 1 :
8490 # print(f"several {module_name} valid condfigs:")
8591 # for field, v in valid_module_configs.items():
@@ -211,7 +217,7 @@ def quote(x):
211217 return f"'{ x } '"
212218
213219 raise RuntimeError (
214- f' Command failed: { " " .join (quote (i ) for i in workers_command )} '
220+ f" Command failed: { ' ' .join (quote (i ) for i in workers_command )} "
215221 ) from e
216222
217223 def kill_workers (self , worker_ids = None ):
@@ -232,7 +238,7 @@ def quote(x):
232238 return f"'{ x } '"
233239
234240 raise RuntimeError (
235- f' Command failed: { " " .join (quote (i ) for i in cmd )} '
241+ f" Command failed: { ' ' .join (quote (i ) for i in cmd )} "
236242 ) from e
237243 self .database .worker_ended (self .engine_id , worker_id )
238244
@@ -261,7 +267,7 @@ def assess_ready_to_start(self, executable):
261267 missing .append (field .name )
262268 if missing :
263269 raise ValueError (
264- f' Value missing for the following parameters: { ", " .join (missing )} '
270+ f" Value missing for the following parameters: { ', ' .join (missing )} "
265271 )
266272
267273 def start (self , executable , debug = False ):
0 commit comments