You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2023/08/29 12:37:36 UTC

[airflow] branch main updated: Fix type annotation in AppflowHook (#33881)

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

potiuk 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 7d267fbefe Fix type annotation in AppflowHook (#33881)
7d267fbefe is described below

commit 7d267fbefefb9f15c1f679954e98d1b06b49d4eb
Author: Andrey Anshin <An...@taragol.is>
AuthorDate: Tue Aug 29 16:37:25 2023 +0400

    Fix type annotation in AppflowHook (#33881)
---
 airflow/providers/amazon/aws/hooks/appflow.py | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/airflow/providers/amazon/aws/hooks/appflow.py b/airflow/providers/amazon/aws/hooks/appflow.py
index c9741278c0..3962a6cf20 100644
--- a/airflow/providers/amazon/aws/hooks/appflow.py
+++ b/airflow/providers/amazon/aws/hooks/appflow.py
@@ -24,7 +24,6 @@ from airflow.providers.amazon.aws.utils.waiter_with_logging import wait
 
 if TYPE_CHECKING:
     from mypy_boto3_appflow.client import AppflowClient
-    from mypy_boto3_appflow.type_defs import TaskOutputTypeDef, TaskTypeDef
 
 
 class AppflowHook(AwsBaseHook):
@@ -93,9 +92,7 @@ class AppflowHook(AwsBaseHook):
         exec_details = last_execs[execution_id]
         self.log.info("Run complete, execution details: %s", exec_details)
 
-    def update_flow_filter(
-        self, flow_name: str, filter_tasks: list[TaskTypeDef], set_trigger_ondemand: bool = False
-    ) -> None:
+    def update_flow_filter(self, flow_name: str, filter_tasks, set_trigger_ondemand: bool = False) -> None:
         """
         Update the flow task filter; all filters will be removed if an empty array is passed to filter_tasks.
 
@@ -106,7 +103,7 @@ class AppflowHook(AwsBaseHook):
         """
         response = self.conn.describe_flow(flowName=flow_name)
         connector_type = response["sourceFlowConfig"]["connectorType"]
-        tasks: list[TaskTypeDef | TaskOutputTypeDef] = []
+        tasks = []
 
         # cleanup old filter tasks
         for task in response["tasks"]: