@@ -211,11 +211,12 @@ def pytask_execute_task(session: Session, task: PTask) -> Future[Any] | None:
211
211
212
212
213
213
def _raise_exception_on_breakpoint (* args : Any , ** kwargs : Any ) -> None : # noqa: ARG001
214
- raise RuntimeError (
214
+ msg = (
215
215
"You cannot use 'breakpoint()' or 'pdb.set_trace()' while parallelizing the "
216
216
"execution of tasks with pytask-parallel. Please, remove the breakpoint or run "
217
217
"the task without parallelization to debug it."
218
218
)
219
+ raise RuntimeError (msg )
219
220
220
221
221
222
def _patch_set_trace_and_breakpoint () -> None :
@@ -235,7 +236,7 @@ def _patch_set_trace_and_breakpoint() -> None:
235
236
def _execute_task ( # noqa: PLR0913
236
237
task : PTask ,
237
238
kwargs : dict [str , Any ],
238
- show_locals : bool ,
239
+ show_locals : bool , # noqa: FBT001
239
240
console_options : ConsoleOptions ,
240
241
session_filterwarnings : tuple [str , ...],
241
242
task_filterwarnings : tuple [Mark , ...],
@@ -251,7 +252,7 @@ def _execute_task( # noqa: PLR0913
251
252
252
253
with warnings .catch_warnings (record = True ) as log :
253
254
# mypy can't infer that record=True means log is not None; help it.
254
- assert log is not None
255
+ assert log is not None # noqa: S101
255
256
256
257
for arg in session_filterwarnings :
257
258
warnings .filterwarnings (* parse_warning_filter (arg , escape = False ))
@@ -284,7 +285,7 @@ def _execute_task( # noqa: PLR0913
284
285
nodes = tree_leaves (task .produces ["return" ])
285
286
values = structure_return .flatten_up_to (out )
286
287
for node , value in zip (nodes , values ):
287
- node .save (value ) # type: ignore[attr-defined]
288
+ node .save (value )
288
289
289
290
processed_exc_info = None
290
291
@@ -305,7 +306,7 @@ def _execute_task( # noqa: PLR0913
305
306
306
307
def _process_exception (
307
308
exc_info : tuple [type [BaseException ], BaseException , TracebackType | None ],
308
- show_locals : bool ,
309
+ show_locals : bool , # noqa: FBT001
309
310
console_options : ConsoleOptions ,
310
311
) -> tuple [type [BaseException ], BaseException , str ]:
311
312
"""Process the exception and convert the traceback to a string."""
0 commit comments