@@ -211,11 +211,12 @@ def pytask_execute_task(session: Session, task: PTask) -> Future[Any] | None:
211211
212212
213213def _raise_exception_on_breakpoint (* args : Any , ** kwargs : Any ) -> None : # noqa: ARG001
214- raise RuntimeError (
214+ msg = (
215215 "You cannot use 'breakpoint()' or 'pdb.set_trace()' while parallelizing the "
216216 "execution of tasks with pytask-parallel. Please, remove the breakpoint or run "
217217 "the task without parallelization to debug it."
218218 )
219+ raise RuntimeError (msg )
219220
220221
221222def _patch_set_trace_and_breakpoint () -> None :
@@ -235,7 +236,7 @@ def _patch_set_trace_and_breakpoint() -> None:
235236def _execute_task ( # noqa: PLR0913
236237 task : PTask ,
237238 kwargs : dict [str , Any ],
238- show_locals : bool ,
239+ show_locals : bool , # noqa: FBT001
239240 console_options : ConsoleOptions ,
240241 session_filterwarnings : tuple [str , ...],
241242 task_filterwarnings : tuple [Mark , ...],
@@ -251,7 +252,7 @@ def _execute_task( # noqa: PLR0913
251252
252253 with warnings .catch_warnings (record = True ) as log :
253254 # 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
255256
256257 for arg in session_filterwarnings :
257258 warnings .filterwarnings (* parse_warning_filter (arg , escape = False ))
@@ -284,7 +285,7 @@ def _execute_task( # noqa: PLR0913
284285 nodes = tree_leaves (task .produces ["return" ])
285286 values = structure_return .flatten_up_to (out )
286287 for node , value in zip (nodes , values ):
287- node .save (value ) # type: ignore[attr-defined]
288+ node .save (value )
288289
289290 processed_exc_info = None
290291
@@ -305,7 +306,7 @@ def _execute_task( # noqa: PLR0913
305306
306307def _process_exception (
307308 exc_info : tuple [type [BaseException ], BaseException , TracebackType | None ],
308- show_locals : bool ,
309+ show_locals : bool , # noqa: FBT001
309310 console_options : ConsoleOptions ,
310311) -> tuple [type [BaseException ], BaseException , str ]:
311312 """Process the exception and convert the traceback to a string."""
0 commit comments