This is an automated email from the ASF dual-hosted git repository.

uranusjr pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 9d2cfb6261 Replace dict.items by dict.values when key is not used in 
core (#33940)
9d2cfb6261 is described below

commit 9d2cfb6261d26b7285b04323f216db2d8ad839e0
Author: Hussein Awala <[email protected]>
AuthorDate: Thu Aug 31 05:40:04 2023 +0200

    Replace dict.items by dict.values when key is not used in core (#33940)
---
 airflow/models/dag.py                | 2 +-
 airflow/utils/log/trigger_handler.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/airflow/models/dag.py b/airflow/models/dag.py
index 5979c51c51..cd3f47da88 100644
--- a/airflow/models/dag.py
+++ b/airflow/models/dag.py
@@ -3275,7 +3275,7 @@ class DAG(LoggingMixin):
         if not self.timetable.can_be_scheduled:
             return
 
-        for k, v in self.params.items():
+        for v in self.params.values():
             # As type can be an array, we would check if `null` is an allowed 
type or not
             if not v.has_value and ("type" not in v.schema or "null" not in 
v.schema["type"]):
                 raise AirflowException(
diff --git a/airflow/utils/log/trigger_handler.py 
b/airflow/utils/log/trigger_handler.py
index 42afcd8afe..aa9a43ec87 100644
--- a/airflow/utils/log/trigger_handler.py
+++ b/airflow/utils/log/trigger_handler.py
@@ -113,7 +113,7 @@ class TriggererHandlerWrapper(logging.Handler):
             del self.handlers[trigger_id]
 
     def flush(self):
-        for _, h in self.handlers.items():
+        for h in self.handlers.values():
             h.flush()
 
     def close(self):

Reply via email to