You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/04/06 19:14:10 UTC
[GitHub] [airflow] ashb commented on a diff in pull request #22792: Serialize mapped operator expansion kwargs logic
ashb commented on code in PR #22792:
URL: https://github.com/apache/airflow/pull/22792#discussion_r844305754
##########
airflow/decorators/base.py:
##########
@@ -357,6 +357,10 @@ def expand(self, **map_kwargs: "Mappable") -> XComArg:
multiple_outputs=self.multiple_outputs,
python_callable=self.function,
mapped_op_kwargs=map_kwargs,
+ # Different from classic operators, kwargs passed to a taskflow
+ # task's expand() contribute to the op_kwargs operator argument, not
+ # the operator arguments themselves, and should expand against it.
+ expansion_kwargs_attr="mapped_op_kwargs",
Review Comment:
nit: Couldn't this be a class variable rather than an attribute?
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org