uranusjr commented on code in PR #25176:
URL: https://github.com/apache/airflow/pull/25176#discussion_r932035824
##########
airflow/models/xcom_arg.py:
##########
@@ -285,8 +288,13 @@ def iter_references(self) -> Iterator[Tuple["Operator",
str]]:
def map(self, f: Callable[[Any], Any]) -> "MapXComArg":
if self.key != XCOM_RETURN_KEY:
- raise ValueError
- return MapXComArg(self, [f])
+ raise ValueError("cannot map against non-return XCom")
+ return super().map(f)
+
+ def zip(self, *others: "XComArg", fillvalue: Any = NOTSET) -> "ZipXComArg":
+ if self.key != XCOM_RETURN_KEY:
+ raise ValueError("cannot map against non-return XCom")
Review Comment:
Nothing theoratical, I’m just not ready to deal with these being used
outside of task-mapping context yet. These can be removed later when other use
cases are experiemented on.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]