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



##########
File path: airflow/callbacks/callback_requests.py
##########
@@ -55,7 +53,7 @@ class TaskCallbackRequest(CallbackRequest):
     def __init__(
         self,
         full_filepath: str,
-        simple_task_instance: SimpleTaskInstance,
+        simple_task_instance,  #: SimpleTaskInstance, Avoid circular import

Review comment:
       ```suggestion
           simple_task_instance: "SimpleTaskInstance"
   ```
   
   and then at the top of the file:
   
   ```python
   from typing import TYPE_CHECKING
   
   if TYPE_CHECKING:
       from airflow.models.taskinstance import SimpleTaskInstance
   ```
   
   If you search for `if TYPE_CHECKING` you'll find more examples in the code 
base




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