You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/12/20 15:18:16 UTC

[GitHub] [airflow] raphaelauv removed a comment on pull request #20411: Add test on skip_all_except

raphaelauv removed a comment on pull request #20411:
URL: https://github.com/apache/airflow/pull/20411#issuecomment-997471522


   returning an empty list will do the work
   
   ```python
   def skip_things() -> str:
           if NOTHING:
               return []
           elif SOMETHING_WEIRD:
               return "task_2"
           else:
               return "task_3"
   
   branch_task = BranchPythonOperator(
       task_id='branch_task',
       python_callable=skip_things)
   
   task_2 = ...
   task_3 = ...
   
   branch_task >> [task_2, task_3 ]
   ```


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org