diff --git a/parsl/executors/high_throughput/interchange.py b/parsl/executors/high_throughput/interchange.py index d032144655..70a42ff344 100644 --- a/parsl/executors/high_throughput/interchange.py +++ b/parsl/executors/high_throughput/interchange.py @@ -205,7 +205,7 @@ def get_tasks(self, count): eg. [{'task_id':, 'buffer':} ... ] """ tasks = [] - for i in range(0, count): + for _ in range(0, count): try: x = self.pending_task_queue.get(block=False) except queue.Empty: @@ -518,7 +518,7 @@ def process_results_incoming(self, interesting_managers, hub_channel): got_result = False m = self._ready_managers[manager_id] - for (b_message, r) in b_messages: + for (_, r) in b_messages: assert 'type' in r, f"Message is missing type entry: {r}" if r['type'] == 'result': got_result = True diff --git a/parsl/executors/high_throughput/zmq_pipes.py b/parsl/executors/high_throughput/zmq_pipes.py index d1d4787f5a..00df7b7d17 100644 --- a/parsl/executors/high_throughput/zmq_pipes.py +++ b/parsl/executors/high_throughput/zmq_pipes.py @@ -53,7 +53,7 @@ def run(self, message, max_retries=3): """ reply = '__PARSL_ZMQ_PIPES_MAGIC__' with self._lock: - for i in range(max_retries): + for _ in range(max_retries): try: self.zmq_socket.send_pyobj(message, copy=True) reply = self.zmq_socket.recv_pyobj() diff --git a/parsl/executors/status_handling.py b/parsl/executors/status_handling.py index 38f8d530b2..b53cbf4b01 100644 --- a/parsl/executors/status_handling.py +++ b/parsl/executors/status_handling.py @@ -193,7 +193,7 @@ def scale_out(self, blocks: int = 1) -> List[str]: raise ScalingFailed(self, "No execution provider available") block_ids = [] logger.info(f"Scaling out by {blocks} blocks") - for i in range(blocks): + for _ in range(blocks): block_id = str(self._block_id_counter.get_id()) logger.info(f"Allocated block ID {block_id}") try: diff --git a/parsl/utils.py b/parsl/utils.py index ef04490dbb..4f0e27b1dc 100644 --- a/parsl/utils.py +++ b/parsl/utils.py @@ -128,7 +128,7 @@ def get_std_fname_mode( @contextmanager def wait_for_file(path: str, seconds: int = 10) -> Generator[None, None, None]: - for i in range(0, int(seconds * 100)): + for _ in range(0, int(seconds * 100)): time.sleep(seconds / 100.) if os.path.exists(path): break