ashb commented on a change in pull request #20795:
URL: https://github.com/apache/airflow/pull/20795#discussion_r781987743
##########
File path: airflow/decorators/task_group.py
##########
@@ -61,7 +61,7 @@ def __attrs_post_init__(self):
def _make_task_group(self, **kwargs) -> TaskGroup:
return TaskGroup(**kwargs)
- def __call__(self, *args, **kwargs) -> R:
+ def __call__(self, *args, **kwargs) -> Union[R, TaskGroup]:
Review comment:
```
@task_group
def foo() -> BashOperator
return BashOperator(task_id='a')
bash_op = foo()
```
--
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]