josh-fell commented on a change in pull request #16732:
URL: https://github.com/apache/airflow/pull/16732#discussion_r664187180
##########
File path: airflow/models/baseoperator.py
##########
@@ -1540,22 +1541,24 @@ def inherits_from_dummy_operator(self):
return getattr(self, '_is_dummy', False)
-def chain(*tasks: Union[BaseOperator, Sequence[BaseOperator]]):
+def chain(*tasks: Union[BaseOperator, "XComArg", Sequence[BaseOperator],
Sequence["XComArg"]]):
r"""
Given a number of tasks, builds a dependency chain.
- Support mix airflow.models.BaseOperator and
List[airflow.models.BaseOperator].
- If you want to chain between two List[airflow.models.BaseOperator], have to
- make sure they have same length.
+ Support mix airflow.models.BaseOperator,
List[airflow.models.BaseOperator], XComArg, and
+ List[airflow.models.XComArg]. If you want to chain between two
List[airflow.models.BaseOperator]
+ or List[airflow.models.XComArg], you have to make sure they have same
length.
Review comment:
👍 Nice catch!
##########
File path: airflow/models/baseoperator.py
##########
@@ -1540,22 +1541,24 @@ def inherits_from_dummy_operator(self):
return getattr(self, '_is_dummy', False)
-def chain(*tasks: Union[BaseOperator, Sequence[BaseOperator]]):
+def chain(*tasks: Union[BaseOperator, "XComArg", Sequence[BaseOperator],
Sequence["XComArg"]]):
r"""
Given a number of tasks, builds a dependency chain.
- Support mix airflow.models.BaseOperator and
List[airflow.models.BaseOperator].
- If you want to chain between two List[airflow.models.BaseOperator], have to
- make sure they have same length.
+ Support mix airflow.models.BaseOperator,
List[airflow.models.BaseOperator], XComArg, and
+ List[airflow.models.XComArg]. If you want to chain between two
List[airflow.models.BaseOperator]
+ or List[airflow.models.XComArg], you have to make sure they have same
length.
Review comment:
👍 Nice catch! Updated.
--
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]