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

henry3260 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 ca137d48ed1 Fix BaseXCom docstrings that say passing None removes a 
filter (#73066)
ca137d48ed1 is described below

commit ca137d48ed1f7e49214d6cf22d936bbb6154b932
Author: PoAn Yang <[email protected]>
AuthorDate: Sun Sep 13 21:34:12 2026 +0900

    Fix BaseXCom docstrings that say passing None removes a filter (#73066)
    
    Signed-off-by: PoAn Yang <[email protected]>
---
 task-sdk/src/airflow/sdk/bases/xcom.py | 48 ++++++++++++++--------------------
 1 file changed, 20 insertions(+), 28 deletions(-)

diff --git a/task-sdk/src/airflow/sdk/bases/xcom.py 
b/task-sdk/src/airflow/sdk/bases/xcom.py
index bc408b94c3b..c209d470bc0 100644
--- a/task-sdk/src/airflow/sdk/bases/xcom.py
+++ b/task-sdk/src/airflow/sdk/bases/xcom.py
@@ -197,8 +197,7 @@ class BaseXCom:
         match the criteria, an arbitrary one is returned.
 
         :param ti_key: The TaskInstanceKey to look up the XCom for.
-        :param key: A key for the XCom. If provided, only XCom with matching
-            keys will be returned. Pass *None* (default) to remove the filter.
+        :param key: A key for the XCom. Only XCom with this key will be 
returned.
         """
         return cls.get_one(
             key=key,
@@ -225,8 +224,7 @@ class BaseXCom:
         match the criteria, an arbitrary one is returned.
 
         :param ti_key: The TaskInstanceKey to look up the XCom for.
-        :param key: A key for the XCom. If provided, only XCom with matching
-            keys will be returned. Pass *None* (default) to remove the filter.
+        :param key: A key for the XCom. Only XCom with this key will be 
returned.
         """
         return await cls.aget_one(
             key=key,
@@ -259,14 +257,12 @@ class BaseXCom:
             have a structured TaskInstance or TaskInstanceKey object available.
 
         :param run_id: Dag run ID for the task.
-        :param dag_id: Only pull XCom from this Dag. Pass *None* (default) to
-            remove the filter.
-        :param task_id: Only XCom from task with matching ID will be pulled.
-            Pass *None* (default) to remove the filter.
-        :param map_index: Only XCom from task with matching ID will be pulled.
-            Pass *None* (default) to remove the filter.
-        :param key: A key for the XCom. If provided, only XCom with matching
-            keys will be returned. Pass *None* (default) to remove the filter.
+        :param dag_id: Dag ID to pull the XCom from.
+        :param task_id: Task ID to pull the XCom from.
+        :param map_index: Map index of the task instance to pull the XCom from.
+            *None* (default) pulls the XCom of a non-mapped task, which has
+            map index ``-1``.
+        :param key: A key for the XCom. Only XCom with this key will be 
returned.
         """
         from airflow.sdk.execution_time.task_runner import SUPERVISOR_COMMS
 
@@ -309,14 +305,12 @@ class BaseXCom:
             have a structured TaskInstance or TaskInstanceKey object available.
 
         :param run_id: Dag run ID for the task.
-        :param dag_id: Only pull XCom from this Dag. Pass *None* (default) to
-            remove the filter.
-        :param task_id: Only XCom from task with matching ID will be pulled.
-            Pass *None* (default) to remove the filter.
-        :param map_index: Only XCom from task with matching ID will be pulled.
-            Pass *None* (default) to remove the filter.
-        :param key: A key for the XCom. If provided, only XCom with matching
-            keys will be returned. Pass *None* (default) to remove the filter.
+        :param dag_id: Dag ID to pull the XCom from.
+        :param task_id: Task ID to pull the XCom from.
+        :param map_index: Map index of the task instance to pull the XCom from.
+            *None* (default) pulls the XCom of a non-mapped task, which has
+            map index ``-1``.
+        :param key: A key for the XCom. Only XCom with this key will be 
returned.
         :param include_prior_dates: If *False* (default), only XCom from the
             specified Dag run is returned. If *True*, the latest matching XCom 
is
             returned regardless of the run it belongs to.
@@ -373,14 +367,12 @@ class BaseXCom:
             have a structured TaskInstance or TaskInstanceKey object available.
 
         :param run_id: Dag run ID for the task.
-        :param dag_id: Only pull XCom from this Dag. Pass *None* (default) to
-            remove the filter.
-        :param task_id: Only XCom from task with matching ID will be pulled.
-            Pass *None* (default) to remove the filter.
-        :param map_index: Only XCom from task with matching ID will be pulled.
-            Pass *None* (default) to remove the filter.
-        :param key: A key for the XCom. If provided, only XCom with matching
-            keys will be returned. Pass *None* (default) to remove the filter.
+        :param dag_id: Dag ID to pull the XCom from.
+        :param task_id: Task ID to pull the XCom from.
+        :param map_index: Map index of the task instance to pull the XCom from.
+            *None* (default) pulls the XCom of a non-mapped task, which has
+            map index ``-1``.
+        :param key: A key for the XCom. Only XCom with this key will be 
returned.
         :param include_prior_dates: If *False* (default), only XCom from the
             specified Dag run is returned. If *True*, the latest matching XCom 
is
             returned regardless of the run it belongs to.

Reply via email to