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 44024564cb fix: `num_of_dpus` typehints- GlueJobHook/Operator (#29176)
44024564cb is described below
commit 44024564cb3dd6835b0375d61e682efc1acd7d2c
Author: Wonhyeong Seo <[email protected]>
AuthorDate: Fri Jan 27 19:41:28 2023 +0900
fix: `num_of_dpus` typehints- GlueJobHook/Operator (#29176)
---
airflow/providers/amazon/aws/hooks/glue.py | 4 ++--
airflow/providers/amazon/aws/operators/glue.py | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/airflow/providers/amazon/aws/hooks/glue.py
b/airflow/providers/amazon/aws/hooks/glue.py
index 6061c6efe0..cbdb657566 100644
--- a/airflow/providers/amazon/aws/hooks/glue.py
+++ b/airflow/providers/amazon/aws/hooks/glue.py
@@ -65,7 +65,7 @@ class GlueJobHook(AwsBaseHook):
concurrent_run_limit: int = 1,
script_location: str | None = None,
retry_limit: int = 0,
- num_of_dpus: int | None = None,
+ num_of_dpus: int | float | None = None,
iam_role_name: str | None = None,
create_job_kwargs: dict | None = None,
*args,
@@ -92,7 +92,7 @@ class GlueJobHook(AwsBaseHook):
elif worker_type_exists and not num_workers_exists:
raise ValueError("Need to specify NumberOfWorkers when specifying
custom WorkerType")
elif num_of_dpus is None:
- self.num_of_dpus = 10
+ self.num_of_dpus: int | float = 10
else:
self.num_of_dpus = num_of_dpus
diff --git a/airflow/providers/amazon/aws/operators/glue.py
b/airflow/providers/amazon/aws/operators/glue.py
index e0b9e684b4..c5218aa977 100644
--- a/airflow/providers/amazon/aws/operators/glue.py
+++ b/airflow/providers/amazon/aws/operators/glue.py
@@ -82,7 +82,7 @@ class GlueJobOperator(BaseOperator):
concurrent_run_limit: int | None = None,
script_args: dict | None = None,
retry_limit: int = 0,
- num_of_dpus: int | None = None,
+ num_of_dpus: int | float | None = None,
aws_conn_id: str = "aws_default",
region_name: str | None = None,
s3_bucket: str | None = None,