subkanthi commented on a change in pull request #21077:
URL: https://github.com/apache/airflow/pull/21077#discussion_r800283199
##########
File path: airflow/decorators/__init__.pyi
##########
@@ -126,7 +126,22 @@ class TaskDecoratorCollection:
such as transmission a large amount of XCom to TaskAPI.
"""
@overload
- def virtualenv(self, python_callable: Function) -> Function: ...
+ def virtualenv(self, python_callable: F) -> F: ...
+ def kubernetes(
+ self, python_callable: Optional[Callable] = None, multiple_outputs:
Optional[bool] = None, **kwargs
+ ) -> TaskDecorator:
+ """Wraps a function to be executed on a k8s pod using
KubernetesPodOperator
+
+ Also accepts any argument that KubernetesPodOperator will via
``kwargs``.
+
+ :param python_callable: Function to decorate
+ :type python_callable: Optional[Callable]
+ :param multiple_outputs: if set, function return value will be
+ unrolled to multiple XCom values. List/Tuples will unroll to xcom
values
+ with index as key. Dict will unroll to xcom values with keys as
XCom keys.
+ Defaults to False.
+ :type multiple_outputs: bool
+ """
Review comment:
Added, thanks.
--
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]