You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by go...@apache.org on 2025/04/17 18:09:39 UTC

(airflow) branch main updated: Fix static check re removing unnecessary else condition (#49415)

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

gopidesu 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 863702f0205 Fix static check re removing unnecessary else condition (#49415)
863702f0205 is described below

commit 863702f0205c276a38d106172ebff10afbe758c8
Author: Daniel Standish <15...@users.noreply.github.com>
AuthorDate: Thu Apr 17 11:09:33 2025 -0700

    Fix static check re removing unnecessary else condition (#49415)
---
 .../src/airflow/providers/standard/operators/trigger_dagrun.py         | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/providers/standard/src/airflow/providers/standard/operators/trigger_dagrun.py b/providers/standard/src/airflow/providers/standard/operators/trigger_dagrun.py
index 0b64667ef04..220ca20dfb3 100644
--- a/providers/standard/src/airflow/providers/standard/operators/trigger_dagrun.py
+++ b/providers/standard/src/airflow/providers/standard/operators/trigger_dagrun.py
@@ -223,8 +223,7 @@ class TriggerDagRunOperator(BaseOperator):
             if dag_model.is_paused:
                 if AIRFLOW_V_3_0_PLUS:
                     raise DagIsPaused(dag_id=self.trigger_dag_id)
-                else:
-                    raise AirflowException(f"Dag {self.trigger_dag_id} is paused")
+                raise AirflowException(f"Dag {self.trigger_dag_id} is paused")
 
         if AIRFLOW_V_3_0_PLUS:
             self._trigger_dag_af_3(context=context, run_id=run_id, parsed_logical_date=parsed_logical_date)