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

eladkal 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 09bb1a87a5 style(providers/google): improve BigQueryInsertJobOperator 
type hinting (#36894)
09bb1a87a5 is described below

commit 09bb1a87a58dfad7c1de537edb8fc3ae1a944ffa
Author: Wei Lee <[email protected]>
AuthorDate: Sat Jan 20 16:42:19 2024 +0800

    style(providers/google): improve BigQueryInsertJobOperator type hinting 
(#36894)
    
    * style(providers/google): improve BigQueryInsertJobOperator type hinting
    
    * style: resolve mypy failure
---
 airflow/providers/google/cloud/operators/bigquery.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/airflow/providers/google/cloud/operators/bigquery.py 
b/airflow/providers/google/cloud/operators/bigquery.py
index deadf0d193..f10e5fbf5c 100644
--- a/airflow/providers/google/cloud/operators/bigquery.py
+++ b/airflow/providers/google/cloud/operators/bigquery.py
@@ -2852,6 +2852,7 @@ class BigQueryInsertJobOperator(GoogleCloudBaseOperator, 
_BigQueryOpenLineageMix
                                 persist_kwargs["dataset_id"] = 
table["datasetId"]
                                 persist_kwargs["project_id"] = 
table["projectId"]
                             BigQueryTableLink.persist(**persist_kwargs)
+
         self.job_id = job.job_id
 
         if self.project_id:
@@ -2861,6 +2862,7 @@ class BigQueryInsertJobOperator(GoogleCloudBaseOperator, 
_BigQueryOpenLineageMix
                 location=self.location,
             )
             context["ti"].xcom_push(key="job_id_path", value=job_id_path)
+
         # Wait for the job to complete
         if not self.deferrable:
             job.result(timeout=self.result_timeout, retry=self.result_retry)
@@ -2882,7 +2884,7 @@ class BigQueryInsertJobOperator(GoogleCloudBaseOperator, 
_BigQueryOpenLineageMix
             self.log.info("Current state of job %s is %s", job.job_id, 
job.state)
             self._handle_job_error(job)
 
-    def execute_complete(self, context: Context, event: dict[str, Any]):
+    def execute_complete(self, context: Context, event: dict[str, Any]) -> str 
| None:
         """Callback for when the trigger fires.
 
         This returns immediately. It relies on trigger to throw an exception,

Reply via email to