This is an automated email from the ASF dual-hosted git repository.
ashb 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 f77f7e4a09e Make the BQ hook importable when google libs are mocked
during doc builds (#73615)
f77f7e4a09e is described below
commit f77f7e4a09e2753f853e108a278e7fb72d14383d
Author: Amogh Desai <[email protected]>
AuthorDate: Wed Sep 23 19:31:24 2026 +0530
Make the BQ hook importable when google libs are mocked during doc builds
(#73615)
---
.../google/src/airflow/providers/google/cloud/hooks/bigquery.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git
a/providers/google/src/airflow/providers/google/cloud/hooks/bigquery.py
b/providers/google/src/airflow/providers/google/cloud/hooks/bigquery.py
index 25294f655b7..e01f752869d 100644
--- a/providers/google/src/airflow/providers/google/cloud/hooks/bigquery.py
+++ b/providers/google/src/airflow/providers/google/cloud/hooks/bigquery.py
@@ -101,7 +101,11 @@ BIGQUERY_LEGACY_SQL_DEFAULT_WARNING = (
"or set `use_legacy_sql=False` to use GoogleSQL."
)
-BigQueryJob = CopyJob | QueryJob | LoadJob | ExtractJob
+if TYPE_CHECKING:
+ BigQueryJob = CopyJob | QueryJob | LoadJob | ExtractJob
+else:
+ # Mocked google libs during docs build break the union, but the name must
exist for runtime importers.
+ BigQueryJob = Any
_ROUTINE_WRITABLE_PROPERTIES: tuple[str, ...] = (
"type_",