This is an automated email from the ASF dual-hosted git repository.
jedcunningham 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 57793d01d9b Import TriggerRule from airflow.sdk in docs examples
(#76522)
57793d01d9b is described below
commit 57793d01d9b43d6642476100b293f801b7c07d00
Author: Jed Cunningham <[email protected]>
AuthorDate: Thu Nov 5 00:02:29 2026 -0700
Import TriggerRule from airflow.sdk in docs examples (#76522)
The FAQ and best-practices examples imported TriggerRule from
airflow.utils.trigger_rule. Dag authors should use the public Task SDK
import, airflow.sdk.
---
airflow-core/docs/best-practices.rst | 4 +---
airflow-core/docs/faq.rst | 3 +--
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/airflow-core/docs/best-practices.rst
b/airflow-core/docs/best-practices.rst
index c30c13eb5eb..0c5cb004c01 100644
--- a/airflow-core/docs/best-practices.rst
+++ b/airflow-core/docs/best-practices.rst
@@ -591,11 +591,9 @@ It's easier to grab the concept with an example. Let's say
that we have the foll
from datetime import datetime
- from airflow.sdk import DAG
- from airflow.sdk import task
from airflow.exceptions import AirflowException
from airflow.providers.standard.operators.bash import BashOperator
- from airflow.utils.trigger_rule import TriggerRule
+ from airflow.sdk import DAG, TriggerRule, task
@task(trigger_rule=TriggerRule.ONE_FAILED, retries=0)
diff --git a/airflow-core/docs/faq.rst b/airflow-core/docs/faq.rst
index 8cdfe95475a..c65c600caf6 100644
--- a/airflow-core/docs/faq.rst
+++ b/airflow-core/docs/faq.rst
@@ -643,9 +643,8 @@ upstream task.
import pendulum
- from airflow.sdk import dag, task
from airflow.exceptions import AirflowException
- from airflow.utils.trigger_rule import TriggerRule
+ from airflow.sdk import TriggerRule, dag, task
@task()