Skip to content

Commit bc7050c

Browse files
committed
lint
1 parent 224a79b commit bc7050c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

toolchain/mfc/sched.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)