yifeireplay opened a new pull request #5548: change task_dict type to Dict[str, 
Task] in the comment
URL: https://github.com/apache/airflow/pull/5548
 
 
   ### Description
   
   Change `task_dict` type from `Dict[str, Task]` to `Dict[str, Task]` in the 
comment of file -`dag.py`.
   
   By running some experiments locally. I found in `Dict[str, Task]`, the value 
is actually `airflow.operators` instead of `TaskInstance`.
   
   By the definition in: https://airflow.apache.org/concepts.html,
   `Task` is an accurate word than `TaskInstance` since `once an operator is 
instantiated, it is referred to as a “task”.  While a task instance represents 
a specific run of a task.`
   
   ### Tests
   I ran the codes below in `test_dag.py`
   
   ```
   for key in dag.task_dict:
       print type(dag.task_dict[key])
   ```
   
   The results I got are 
   ```
   <class 'airflow.operators.dummy_operator.DummyOperator'>
   <class 'airflow.operators.dummy_operator.DummyOperator'>
   <class 'airflow.operators.dummy_operator.DummyOperator'>
   ```
   
   ### Commits
   
   - change task_dict type to Dict[str, Task] in the comment

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to