uranusjr commented on PR #22941:
URL: https://github.com/apache/airflow/pull/22941#issuecomment-1096943169

   It’s a nice feature but I don’t quite buy the syntax. The `hello` takes no 
arguments, making it magically possible to accept `task_id` does not seem to 
mesh well with the initial design. It would not work well with type-checking 
DAG files, if I understand correctly.
   
   Maybe something like this would read better?
   
   ```python
   @task
   def hello():
       print('Hello')
   
   @dag():
   def mydag2():
       for i in range(3):
           task(hello, task_id=f'welcome_message_{i}')()
   ```


-- 
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]

Reply via email to