uranusjr commented on a change in pull request #17099:
URL: https://github.com/apache/airflow/pull/17099#discussion_r672768216
##########
File path: airflow/models/baseoperator.py
##########
@@ -1546,13 +1546,17 @@ def inherits_from_dummy_operator(self):
return getattr(self, '_is_dummy', False)
-def chain(*tasks: Union[BaseOperator, "XComArg", Sequence[Union[BaseOperator,
"XComArg"]]]):
+def chain(
+ *tasks: Union[
+ BaseOperator, "XComArg", EdgeModifier, Sequence[Union[BaseOperator,
"XComArg", EdgeModifier]]
Review comment:
At this point we should make this `BaseOperator, "XComArg",
EdgeModifier` thing a type alias, maybe something like
```python
Chainable = Union[BaseOperator, "XComArg", EdgeModifier]
def chain(*tasks: Union[Chainable, Sequence[Chainable]]) -> None:
...
```
##########
File path: airflow/models/baseoperator.py
##########
@@ -1546,13 +1546,17 @@ def inherits_from_dummy_operator(self):
return getattr(self, '_is_dummy', False)
-def chain(*tasks: Union[BaseOperator, "XComArg", Sequence[Union[BaseOperator,
"XComArg"]]]):
+def chain(
+ *tasks: Union[
+ BaseOperator, "XComArg", EdgeModifier, Sequence[Union[BaseOperator,
"XComArg", EdgeModifier]]
Review comment:
At this point we should make this `BaseOperator, "XComArg",
EdgeModifier` thing a type alias, maybe something like
```python
Chainable = Union[BaseOperator, "XComArg", EdgeModifier]
def chain(*tasks: Union[Chainable, Sequence[Chainable]]) -> None:
...
```
--
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]