Skip to content

Commit

Permalink
Bump to mypy-boto3-appflow and pass without # type: ignore[arg-type] (
Browse files Browse the repository at this point in the history
#44115)

* bump appflow

* pass hook appflow test
  • Loading branch information
jx2lee authored Nov 18, 2024
1 parent 5085151 commit eb1153e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion generated/provider_dependencies.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"aiobotocore>=2.13.0",
"aws_xray_sdk>=2.12.0",
"moto[cloudformation,glue]>=5.0.0",
"mypy-boto3-appflow>=1.34.0,<1.35.39",
"mypy-boto3-appflow>=1.35.39",
"mypy-boto3-rds>=1.34.90",
"mypy-boto3-redshift-data>=1.34.0",
"mypy-boto3-s3>=1.34.90",
Expand Down
19 changes: 14 additions & 5 deletions providers/src/airflow/providers/amazon/aws/hooks/appflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@
# under the License.
from __future__ import annotations

from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Sequence, cast

from mypy_boto3_appflow.type_defs import (
DestinationFlowConfigTypeDef,
SourceFlowConfigTypeDef,
TaskTypeDef,
TriggerConfigTypeDef,
)

from airflow.providers.amazon.aws.hooks.base_aws import AwsGenericHook
from airflow.providers.amazon.aws.utils.waiter_with_logging import wait
Expand Down Expand Up @@ -117,9 +124,11 @@ def update_flow_filter(self, flow_name: str, filter_tasks, set_trigger_ondemand:

self.conn.update_flow(
flowName=response["flowName"],
destinationFlowConfigList=response["destinationFlowConfigList"],
sourceFlowConfig=response["sourceFlowConfig"],
triggerConfig=response["triggerConfig"],
destinationFlowConfigList=cast(
Sequence[DestinationFlowConfigTypeDef], response["destinationFlowConfigList"]
),
sourceFlowConfig=cast(SourceFlowConfigTypeDef, response["sourceFlowConfig"]),
triggerConfig=cast(TriggerConfigTypeDef, response["triggerConfig"]),
description=response.get("description", "Flow description."),
tasks=tasks,
tasks=cast(Sequence[TaskTypeDef], tasks),
)
4 changes: 1 addition & 3 deletions providers/src/airflow/providers/amazon/provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,7 @@ devel-dependencies:
- aiobotocore>=2.13.0
- aws_xray_sdk>=2.12.0
- moto[cloudformation,glue]>=5.0.0
# See https://github.com/apache/airflow/pull/42954#discussion_r1817993084
# remove upper limit when the typing issue is fixed
- mypy-boto3-appflow>=1.34.0,<1.35.39
- mypy-boto3-appflow>=1.35.39
- mypy-boto3-rds>=1.34.90
- mypy-boto3-redshift-data>=1.34.0
- mypy-boto3-s3>=1.34.90
Expand Down

0 comments on commit eb1153e

Please sign in to comment.