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

shahar1 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 cc94831e213 Fix docstring cross-references that Sphinx 9 cannot 
resolve (#74169)
cc94831e213 is described below

commit cc94831e213f93a0367642bad0574f8e94a85e7b
Author: Shahar Epstein <[email protected]>
AuthorDate: Sun Oct 4 17:49:37 2026 +0300

    Fix docstring cross-references that Sphinx 9 cannot resolve (#74169)
    
    * Fix docstring cross-references that Sphinx 9 cannot resolve
    
    Sphinx 9 resolves annotation and field types project-wide, which turns
    a few long-standing docstring mistakes into ambiguous or broken
    references: a parameter field written as ":param name (int):", return
    types documented as "object" where the signature already names the real
    class, batch executor aliases whose names clash with the ECS and Lambda
    executor aliases, and a Task SDK link to an intersphinx inventory name
    that does not exist.
    
    
    * Give the batch executor's WorkloadKey import a module-unique name
    
    Sphinx 8 registers the canonical target of a documented type alias as
    an object. Importing the core WorkloadKey as _WorkloadKey in the batch
    executor made its canonical name identical to the Lambda executor's, so
    the Sphinx 8 docs build failed with a duplicate object description.
    Sphinx 9 no longer reports that, which is why it only showed up on
    Python 3.10.
---
 docs/spelling_wordlist.txt                                          | 2 ++
 .../src/airflow/providers/amazon/aws/executors/batch/utils.py       | 6 +++---
 .../google/src/airflow/providers/google/cloud/hooks/compute.py      | 3 ---
 .../src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py   | 2 +-
 task-sdk/docs/deferred-vs-async-operators.rst                       | 2 +-
 5 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/docs/spelling_wordlist.txt b/docs/spelling_wordlist.txt
index a52f6c650d7..2719dde430d 100644
--- a/docs/spelling_wordlist.txt
+++ b/docs/spelling_wordlist.txt
@@ -876,7 +876,9 @@ instafail
 installable
 InstanceFlexibilityPolicy
 InstanceGroupConfig
+InstanceGroupManager
 InstanceSelection
+InstanceTemplate
 instanceTemplates
 InstanceType
 instanceType
diff --git 
a/providers/amazon/src/airflow/providers/amazon/aws/executors/batch/utils.py 
b/providers/amazon/src/airflow/providers/amazon/aws/executors/batch/utils.py
index 4fc127fca86..96f8e1d38e3 100644
--- a/providers/amazon/src/airflow/providers/amazon/aws/executors/batch/utils.py
+++ b/providers/amazon/src/airflow/providers/amazon/aws/executors/batch/utils.py
@@ -29,14 +29,14 @@ if TYPE_CHECKING:
     from airflow.providers.amazon.version_compat import AIRFLOW_V_3_3_PLUS
 
     if AIRFLOW_V_3_3_PLUS:
-        from airflow.executors.workloads.types import WorkloadKey
+        from airflow.executors.workloads.types import WorkloadKey as 
_BatchWorkloadKey
 
-        BatchJobWorkloadKey: TypeAlias = WorkloadKey
+        BatchJobWorkloadKey: TypeAlias = _BatchWorkloadKey
     else:
         BatchJobWorkloadKey: TypeAlias = TaskInstanceKey  # type: 
ignore[no-redef, misc]
 
 
-CommandType = list[str]
+CommandType: TypeAlias = list[str]
 ExecutorConfigType = dict[str, Any]
 
 CONFIG_GROUP_NAME = "aws_batch_executor"
diff --git 
a/providers/google/src/airflow/providers/google/cloud/hooks/compute.py 
b/providers/google/src/airflow/providers/google/cloud/hooks/compute.py
index 25cd9e9a6ea..35a468adcf5 100644
--- a/providers/google/src/airflow/providers/google/cloud/hooks/compute.py
+++ b/providers/google/src/airflow/providers/google/cloud/hooks/compute.py
@@ -244,7 +244,6 @@ class ComputeEngineHook(GoogleBaseHook):
         :param metadata: Additional metadata that is provided to the method.
         :return: Instance Template representation as object according to
             
https://cloud.google.com/compute/docs/reference/rest/v1/instanceTemplates
-        :rtype: object
         """
         client = self.get_compute_instance_template_client()
         instance_template = client.get(
@@ -369,7 +368,6 @@ class ComputeEngineHook(GoogleBaseHook):
         :param metadata: Additional metadata that is provided to the method.
         :return: Instance representation as object according to
             https://cloud.google.com/compute/docs/reference/rest/v1/instances
-        :rtype: object
         """
         client = self.get_compute_instance_client()
         instance = client.get(
@@ -621,7 +619,6 @@ class ComputeEngineHook(GoogleBaseHook):
         :param metadata: Additional metadata that is provided to the method.
         :return: Instance Group Managers representation as object according to
             
https://cloud.google.com/compute/docs/reference/rest/v1/instanceGroupManagers
-        :rtype: object
         """
         client = self.get_compute_instance_group_managers_client()
         instance_group_manager = client.get(
diff --git 
a/providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py
 
b/providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py
index 1fe4b30c40b..a68decf6946 100644
--- 
a/providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py
+++ 
b/providers/google/src/airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py
@@ -359,7 +359,7 @@ class AutoMLHook(GoogleBaseHook, OperationHelper):
             values in this column give more importance to the row during Model 
training. The column must have
             numeric values between 0 and 10000 inclusively, and 0 value means 
that the row is ignored. If the
             weight column field is not set, then all rows are assumed to have 
equal weight of 1.
-        :param budget_milli_node_hours (int): Optional. The train budget of 
creating this Model, expressed in
+        :param budget_milli_node_hours: Optional. The train budget of creating 
this Model, expressed in
             milli node hours i.e. 1,000 value in this field means 1 node hour. 
The training cost of the model
             will not exceed this budget. The final cost will be attempted to 
be close to the budget, though
             may end up being (even) noticeably smaller - at the backend's 
discretion. This especially may
diff --git a/task-sdk/docs/deferred-vs-async-operators.rst 
b/task-sdk/docs/deferred-vs-async-operators.rst
index 9d1e1f00579..4212e362461 100644
--- a/task-sdk/docs/deferred-vs-async-operators.rst
+++ b/task-sdk/docs/deferred-vs-async-operators.rst
@@ -38,7 +38,7 @@ Deferred Operators
 ------------------
 
 A deferred operator is an operator that can pause its execution until an 
external trigger event occurs,
-without holding a worker slot. For more details see 
:doc:`airflow:authoring-and-scheduling/deferring`.
+without holding a worker slot. For more details see 
:doc:`apache-airflow:authoring-and-scheduling/deferring`.
 Examples include the HttpOperator in deferrable mode, sensors or operators 
integrated with triggers.
 
 Key characteristics:

Reply via email to