pankajkoti commented on code in PR #39604:
URL: https://github.com/apache/airflow/pull/39604#discussion_r1603985334


##########
airflow/cli/commands/task_command.py:
##########
@@ -177,7 +176,7 @@ def _get_ti_db_access(
 
     if not exec_date_or_run_id and not create_if_necessary:
         raise ValueError("Must provide `exec_date_or_run_id` if not 
`create_if_necessary`.")
-    if needs_expansion(task):
+    if task.get_needs_expansion():
         if map_index < 0:
             raise RuntimeError("No map_index passed to mapped task")

Review Comment:
   yes :) I did see the elif below earlier. However, we can leave it as it is 
since unrelated, agree.
   
   But I think logically 
   ```
   if a==1:
       if b==2:
           print("Hello, ab!")
   elif c==3:
       print("Hello, World!")
   ```
   
   is same as
   ```
   if a == 1 and b == 2:
       print("Hello, ab!")
   elif c == 3:
       print("Hello, World!")
   ```
   It's just that the latter has less nested branching for print("Hello, ab")



-- 
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-unsubscr...@airflow.apache.org

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

Reply via email to