ZeeD commented on PR #42103:
URL: https://github.com/apache/airflow/pull/42103#issuecomment-2543636639

   @ashb I use a copy of this plugin in my project, to help me during the dag 
authoring.
   
   In my case I relies on taskflow definition and I have a bunch of `@task` 
annotated functions, and I want to typecheck the task connections. A dummy 
example would be something like
   
   ```python
   
   @task
   def retrieve_url(dag_run: DagRun) -> str:
       """something that uses dag_run.conf"""
       return dag_run.conf['url']
   
   @task
   def print_content(url: str) -> None:
       """something that uses url from xcom"""
       print(request.get(url))
   
   @dag
   def my_dag() -> DAG:
      url = retrieve_url() # dag_run is not passed
      print_content(url) # url is passed
   
   my_dag()
   ```
   
   without the plugin I would have had errors in the dag definition or rely on 
`**context` in the task witch is clumsy to use
   


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