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


##########
airflow/decorators/__init__.pyi:
##########
@@ -245,5 +247,11 @@ class TaskDecoratorCollection:
         :param cap_add: Include container capabilities
         """
         # [END decorator_signature]
+    @overload
+    def sensor(self, *, python_callable: Optional[Callable] = None, **kwargs) 
-> TaskDecorator:
+        """
+        Wraps a Python function into a sensor operator.
+        :param python_callable: decorated function that implements the poke() 
logics of a sensor operator.
+        """

Review Comment:
   By not using `PythonSensor`, this implementation looses the ability to pass 
context variables (such as `ti`) to the callable. The ability of passing in 
`templates_dict` is also lost.



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