Skip to content

Commit 4da6657

Browse files
authored
Remove unused codepath from executor scale-out (#3551)
block_ids is populatd by _scale_out which always returns a list, according to its type signature. So the `None` codepath should not ever be reached. mypy agrees: after adding an else clause (to act on the `None` case), mypy then marks the added clause as unreachable.
1 parent 64e163c commit 4da6657

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

parsl/executors/status_handling.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,11 @@ def _filter_scale_in_ids(self, to_kill, killed):
176176

177177
def scale_out_facade(self, n: int) -> List[str]:
178178
block_ids = self._scale_out(n)
179-
if block_ids is not None:
180-
new_status = {}
181-
for block_id in block_ids:
182-
new_status[block_id] = JobStatus(JobState.PENDING)
183-
self.send_monitoring_info(new_status)
184-
self._status.update(new_status)
179+
new_status = {}
180+
for block_id in block_ids:
181+
new_status[block_id] = JobStatus(JobState.PENDING)
182+
self.send_monitoring_info(new_status)
183+
self._status.update(new_status)
185184
return block_ids
186185

187186
def _scale_out(self, blocks: int = 1) -> List[str]:

0 commit comments

Comments
 (0)