Skip to content

Commit 78ed039

Browse files
committed
Fix pedantic issue with int assignment
1 parent 3a82dc7 commit 78ed039

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/jobflow_remote/jobs/batch.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,16 +101,16 @@ def get_terminated(self) -> list[tuple[str, int, str]]:
101101
"""
102102
terminated = []
103103
for i in self.host.listdir(self.terminated_dir):
104-
job_id, index, process_uuid = i.split("_")
105-
index = int(index)
104+
job_id, _index, process_uuid = i.split("_")
105+
index = int(_index)
106106
terminated.append((job_id, index, process_uuid))
107107
return terminated
108108

109109
def get_running(self) -> list[tuple[str, int, str]]:
110110
running = []
111111
for filename in self.host.listdir(self.running_dir):
112-
job_id, index, process_uuid = filename.split("_")
113-
index = int(index)
112+
job_id, _index, process_uuid = filename.split("_")
113+
index = int(_index)
114114
running.append((job_id, index, process_uuid))
115115
return running
116116

src/jobflow_remote/jobs/run.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ def run_batch_jobs(
133133
else:
134134
wait = 0
135135
count += 1
136-
job_id, index = job_str.split("_")
137-
index = int(index)
136+
job_id, _index = job_str.split("_")
137+
index: int = int(_index)
138138
logger.info(f"Starting job with id {job_id} and index {index}")
139139
job_path = get_job_path(job_id=job_id, index=index, base_path=base_run_dir)
140140
try:

0 commit comments

Comments
 (0)