88
99from __future__ import annotations
1010
11- # IMPORTANT: Import _mp_setup FIRST to configure sys.path before unpickling
12- from . import _mp_setup # noqa: F401
13-
1411import logging
1512import time
1613from threading import Condition
2320
2421from .._scanner .result import ResultReport
2522from .._transcript .types import TranscriptInfo
26- from . import _mp_common
23+
24+ # IMPORTANT: Import _mp_setup FIRST to configure sys.path before unpickling
25+ from . import (
26+ _mp_common ,
27+ _mp_setup , # noqa: F401
28+ )
2729from ._iterator import iterator_from_queue
2830from ._mp_common import IPCContext , LoggingItem , run_sync_on_thread
2931from ._mp_logging import patch_inspect_log_handler
@@ -73,7 +75,7 @@ def _wait_for_shutdown() -> None:
7375def subprocess_main (
7476 worker_id : int ,
7577 task_count : int ,
76- ipc_context : IPCContext ,
78+ ctx : IPCContext ,
7779) -> None :
7880 """Worker subprocess main function.
7981
@@ -83,10 +85,8 @@ def subprocess_main(
8385 Args:
8486 worker_id: Unique identifier for this worker process
8587 task_count: Number of concurrent tasks for this worker process
86- ipc_context : Shared IPC context passed from parent process
88+ ctx : Shared IPC context passed from parent process
8789 """
88- # Use IPC context passed as argument (for spawn compatibility)
89- ctx = ipc_context
9090
9191 def _log_in_parent (record : logging .LogRecord ) -> None :
9292 # Strip exc_info from record to avoid pickling traceback objects since it
0 commit comments