uranusjr commented on a change in pull request #22562:
URL: https://github.com/apache/airflow/pull/22562#discussion_r836271081



##########
File path: 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:
       `python_callable` can’t be keyword-only, it needs to be accepted as 
positional for the decorator to work. Also individual arguments should be 
spelled out explicitly (instead of using `kwargs`) since this file is providing 
editor autocompletion, and `kwargs` is mostly useless for autocompletion.




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