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 8d6acce843 Fix imports in extra link documentation (#34547)
8d6acce843 is described below

commit 8d6acce8436789227bbb5d31d0a9e72c609dc3cc
Author: Achim Gädke <135793393+achimgaedkelyn...@users.noreply.github.com>
AuthorDate: Thu Oct 5 11:12:22 2023 +1300

    Fix imports in extra link documentation (#34547)
    
    Co-authored-by: Tzu-ping Chung <uranu...@gmail.com>
---
 docs/apache-airflow/howto/define-extra-link.rst | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/docs/apache-airflow/howto/define-extra-link.rst 
b/docs/apache-airflow/howto/define-extra-link.rst
index 8f2f918d45..733a965bc7 100644
--- a/docs/apache-airflow/howto/define-extra-link.rst
+++ b/docs/apache-airflow/howto/define-extra-link.rst
@@ -28,6 +28,7 @@ The following code shows how to add extra links to an 
operator via Plugins:
 .. code-block:: python
 
     from airflow.models.baseoperator import BaseOperator, BaseOperatorLink
+    from airflow.models.taskinstancekey import TaskInstanceKey
     from airflow.plugins_manager import AirflowPlugin
 
 
@@ -80,8 +81,9 @@ tasks using 
:class:`~airflow.providers.amazon.aws.transfers.gcs_to_s3.GCSToS3Ope
 
 .. code-block:: python
 
+  from airflow.models.baseoperator import BaseOperator, BaseOperatorLink
+  from airflow.models.taskinstancekey import TaskInstanceKey
   from airflow.plugins_manager import AirflowPlugin
-  from airflow.models.baseoperator import BaseOperatorLink
   from airflow.providers.amazon.aws.transfers.gcs_to_s3 import GCSToS3Operator
 
 
@@ -117,9 +119,10 @@ Console, but if we wanted to change that link we could:
 
 .. code-block:: python
 
-    from airflow.plugins_manager import AirflowPlugin
-    from airflow.models.baseoperator import BaseOperatorLink
+    from airflow.models.baseoperator import BaseOperatorLink, BaseOperator
+    from airflow.models.taskinstancekey import TaskInstanceKey
     from airflow.models.xcom import XCom
+    from airflow.plugins_manager import AirflowPlugin
     from airflow.providers.google.cloud.operators.bigquery import 
BigQueryOperator
 
     # Change from https to http just to display the override

Reply via email to