potiuk commented on code in PR #33234:
URL: https://github.com/apache/airflow/pull/33234#discussion_r1289000634


##########
airflow/providers/daskexecutor/executors/dask_executor.py:
##########
@@ -135,13 +135,13 @@ def end(self) -> None:
             assert self.client
             assert self.futures
 
-        self.client.cancel(list(self.futures.keys()))
+        self.client.cancel(list(self.futures))
         for future in as_completed(self.futures.copy()):
             self._process_future(future)
 
     def terminate(self):
         if TYPE_CHECKING:
             assert self.futures
 
-        self.client.cancel(self.futures.keys())
+        self.client.cancel(list(self.futures))

Review Comment:
   Yeah I also agree with @dstandish that .keys() mor often than not is a 
better choice. . It's probably fine to usse:
   
   ```
   if smth in dict:
   ```
   
   but  this is a bit too much:
   
   ``
   cancel(list(dict)) 
   ``



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to