kaxil commented on code in PR #48244:
URL: https://github.com/apache/airflow/pull/48244#discussion_r2018092267


##########
task-sdk/src/airflow/sdk/definitions/baseoperator.py:
##########
@@ -1549,6 +1549,26 @@ def render_template_fields(
             jinja_env = self.get_template_env()
         self._do_render_template_fields(self, self.template_fields, context, 
jinja_env, set())
 
+    def pre_execute(self, context: Any):
+        """Execute right before self.execute() is called."""
+
+    def execute(self, context: Context) -> Any:
+        """
+        Derive when creating an operator.
+
+        The main method to execute the task. Context is the same dictionary 
used as when rendering jinja templates.
+
+        Refer to get_template_context for more context.
+        """
+        raise NotImplementedError()
+
+    def post_execute(self, context: Any, result: Any = None):
+        """
+        Execute right after self.execute() is called.
+
+        It is passed the execution context and any results returned by the 
operator.
+        """

Review Comment:
   `pass` is moot since we have docstrings. All the following are same :)
   
   
   ```python
   def x(): ...
   
   def x():
       pass
   
   def x():
       """
   ```



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