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 2024/02/24 12:12:18 UTC
(airflow) branch main updated: update pre-commit (#37665)
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 14d9bff3ad update pre-commit (#37665)
14d9bff3ad is described below
commit 14d9bff3adec09b24470aa7d86a333c57a53c022
Author: Albert Olweny <41...@users.noreply.github.com>
AuthorDate: Sat Feb 24 15:12:11 2024 +0300
update pre-commit (#37665)
---
.pre-commit-config.yaml | 1 -
airflow/providers/databricks/operators/databricks.py | 8 ++++----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 434aaea43f..2eaf82dcd5 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -325,7 +325,6 @@ repos:
exclude: |
(?x)^(
^.*__init__\.py$|
- ^airflow\/providers\/databricks\/operators\/databricks\.py$|
^airflow\/providers\/amazon\/aws\/transfers\/redshift_to_s3\.py$|
^airflow\/providers\/google\/cloud\/operators\/compute\.py$|
^airflow\/providers\/amazon\/aws\/operators\/emr\.py$|
diff --git a/airflow/providers/databricks/operators/databricks.py b/airflow/providers/databricks/operators/databricks.py
index 79d6b74704..80fc77a41f 100644
--- a/airflow/providers/databricks/operators/databricks.py
+++ b/airflow/providers/databricks/operators/databricks.py
@@ -287,8 +287,8 @@ class DatabricksCreateJobsOperator(BaseOperator):
self.json["git_source"] = git_source
if access_control_list is not None:
self.json["access_control_list"] = access_control_list
-
- self.json = normalise_json_content(self.json)
+ if self.json:
+ self.json = normalise_json_content(self.json)
@cached_property
def _hook(self):
@@ -797,8 +797,8 @@ class DatabricksRunNowOperator(BaseOperator):
self.json["spark_submit_params"] = spark_submit_params
if idempotency_token is not None:
self.json["idempotency_token"] = idempotency_token
-
- self.json = normalise_json_content(self.json)
+ if self.json:
+ self.json = normalise_json_content(self.json)
# This variable will be used in case our task gets killed.
self.run_id: int | None = None
self.do_xcom_push = do_xcom_push