@@ -62,24 +62,30 @@ def execution_context(engine_label, engine_config, executable):
62
62
req_to_check .update (added_req )
63
63
else :
64
64
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
+ )
68
70
69
71
# now check we have only one module for each
70
72
for module_name in needed_modules :
71
73
valid_module_configs = valid_configs .get (module_name )
72
74
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 ():
77
83
# Get explanation about invalid config rejection
78
84
explaination = module_config .is_valid_config (requirements , explain = True )
79
85
message += f"\n - { module_field .name } is not valid for requirements: { explaination } "
80
86
81
87
raise RuntimeError (message )
82
-
88
+
83
89
if len (valid_module_configs ) > 1 :
84
90
# print(f"several {module_name} valid condfigs:")
85
91
# for field, v in valid_module_configs.items():
@@ -211,7 +217,7 @@ def quote(x):
211
217
return f"'{ x } '"
212
218
213
219
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 )} "
215
221
) from e
216
222
217
223
def kill_workers (self , worker_ids = None ):
@@ -232,7 +238,7 @@ def quote(x):
232
238
return f"'{ x } '"
233
239
234
240
raise RuntimeError (
235
- f' Command failed: { " " .join (quote (i ) for i in cmd )} '
241
+ f" Command failed: { ' ' .join (quote (i ) for i in cmd )} "
236
242
) from e
237
243
self .database .worker_ended (self .engine_id , worker_id )
238
244
@@ -261,7 +267,7 @@ def assess_ready_to_start(self, executable):
261
267
missing .append (field .name )
262
268
if missing :
263
269
raise ValueError (
264
- f' Value missing for the following parameters: { ", " .join (missing )} '
270
+ f" Value missing for the following parameters: { ', ' .join (missing )} "
265
271
)
266
272
267
273
def start (self , executable , debug = False ):
0 commit comments