@@ -24,7 +24,7 @@ def run(self):
2424
2525
2626@dataclasses .dataclass
27- class WorkerThreadHolder :
27+ class WorkerThreadHolder : # pylint: disable=too-many-instance-attributes
2828 thread : threading .Thread
2929 ppn : int
3030 load : float
@@ -38,7 +38,7 @@ class Task:
3838 args : typing .List [typing .Any ]
3939 load : float
4040
41- def sched (tasks : typing .List [Task ], nThreads : int , devices : typing .Set [int ] = None ) -> None :
41+ def sched (tasks : typing .List [Task ], nThreads : int , devices : typing .Set [int ] = None ) -> None : # pylint: disable=too-many-locals,too-many-branches,too-many-statements
4242 nAvailable : int = nThreads
4343 threads : typing .List [WorkerThreadHolder ] = []
4444
@@ -75,12 +75,12 @@ def join_first_dead_thread(progress, complete_tracker) -> None:
7575 # Test framework handled the exception gracefully (e.g., test failure)
7676 # Don't re-raise - this is expected behavior
7777 pass
78- # Unhandled exception - this indicates a real problem
7978 elif hasattr (threadHolder .thread , 'exc_info' ) and threadHolder .thread .exc_info :
79+ # Unhandled exception - this indicates a real problem
8080 error_msg = f"Worker thread { threadID } failed with unhandled exception:\n { threadHolder .thread .exc_info } "
8181 raise RuntimeError (error_msg ) from threadHolder .thread .exc
82- else :
83- raise threadHolder .thread .exc
82+
83+ raise threadHolder .thread .exc
8484
8585 nAvailable += threadHolder .ppn
8686 for device in threadHolder .devices or set ():
0 commit comments