From 7cef5500c81c8c0f44f10a4a8bbf1397d0f04b4b Mon Sep 17 00:00:00 2001 From: Andrey Anshin Date: Tue, 29 Aug 2023 16:02:56 +0400 Subject: [PATCH] Fix type annotation in AppflowHook --- 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 c9741278c00a7..3962a6cf207d1 100644 --- a/airflow/providers/amazon/aws/hooks/appflow.py +++ b/airflow/providers/amazon/aws/hooks/appflow.py @@ -24,7 +24,6 @@ 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 @@ def _log_execution_description(self, flow_name: str, execution_id: str): 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 @@ def update_flow_filter( """ 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"]: