ashb commented on a change in pull request #21505:
URL: https://github.com/apache/airflow/pull/21505#discussion_r804798750



##########
File path: airflow/models/taskinstance.py
##########
@@ -1812,8 +1821,10 @@ def get_template_context(
 
         integrate_macros_plugins()
 
-        task: "BaseOperator" = self.task
-        dag: DAG = task.dag
+        task = self.task
+        dag: Optional[DAG] = task.dag
+        assert dag is not None  # For Mypy.

Review comment:
       ```suggestion
           assert dag  # For Mypy.
   ```
   
   For consistency




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