yifeireplay opened a new pull request #5549: change task_dict type to Dict[str, BaseOperator] in the comment URL: https://github.com/apache/airflow/pull/5549 ### Description Change `task_dict` type from `Dict[str, Task]` to `Dict[str, BaseOperator]` in the comment of file -`dag.py`. By running some experiments locally. I found in `task_dict`, the value is actually `airflow.operators` instead of `TaskInstance`. By the definition in: https://airflow.apache.org/concepts.html, `"TaskInstance" represents a specific run of a task.` I feel Operator/Task is more accurate here. And TaskInstance confused me when reading the codes. I tried find `execute` method in `TaskInstance`. ### 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
