uranusjr commented on code in PR #39585:
URL: https://github.com/apache/airflow/pull/39585#discussion_r1634602053


##########
airflow/models/taskinstance.py:
##########
@@ -3000,8 +3019,8 @@ def _execute_task(self, context: Context, task_orig: 
Operator):
         return _execute_task(self, context, task_orig)
 
     @provide_session
-    def defer_task(self, exception: TaskDeferred, session: Session) -> None:
-        """Mark the task as deferred and sets up the trigger that is needed to 
resume it.
+    def defer_task(self, exception: TaskDeferred | None = None, session: 
Session = NEW_SESSION) -> None:

Review Comment:
   ```suggestion
       def defer_task(self, exception: TaskDeferred | None, session: Session = 
NEW_SESSION) -> None:
   ```
   
   Let’s make this a required argument for explicitness.



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