From 00fe5465a13affb6428c8d0e7bfa7af339c7fb80 Mon Sep 17 00:00:00 2001 From: "D. Ferruzzi" Date: Thu, 17 Aug 2023 05:14:26 -0700 Subject: [PATCH] Static check fixes (#33462) (cherry picked from commit 5ee1bcbef992102b3957db39a90254dfc9c4adeb) --- airflow/models/dag.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/airflow/models/dag.py b/airflow/models/dag.py index beb7fe013152f..75fee04145de7 100644 --- a/airflow/models/dag.py +++ b/airflow/models/dag.py @@ -575,7 +575,7 @@ def __init__( template_searchpath = [template_searchpath] self.template_searchpath = template_searchpath self.template_undefined = template_undefined - self.last_loaded = timezone.utcnow() + self.last_loaded: datetime = timezone.utcnow() self.safe_dag_id = dag_id.replace(".", "__dot__") self.max_active_runs = max_active_runs if self.timetable.active_runs_limit is not None: @@ -620,8 +620,8 @@ def __init__( # To keep it in parity with Serialized DAGs # and identify if DAG has on_*_callback without actually storing them in Serialized JSON - self.has_on_success_callback = self.on_success_callback is not None - self.has_on_failure_callback = self.on_failure_callback is not None + self.has_on_success_callback: bool = self.on_success_callback is not None + self.has_on_failure_callback: bool = self.on_failure_callback is not None self._access_control = DAG._upgrade_outdated_dag_access_control(access_control) self.is_paused_upon_creation = is_paused_upon_creation