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:
       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.
   
   Also, does this make sense?
   
   ```python
   @sensor  # No arguments at all!
   def func():
       return PokeReturnValue(...)
   ```
   
   If not, `python_callable` should be removed since that argument is there to 
specifically support this use case.




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