You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2018/08/07 14:15:17 UTC

[GitHub] kaxil closed pull request #3712: [AIRFLOW-2864] Fix docstrings for SubDagOperator

kaxil closed pull request #3712: [AIRFLOW-2864] Fix docstrings for SubDagOperator
URL: https://github.com/apache/incubator-airflow/pull/3712
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/airflow/operators/subdag_operator.py b/airflow/operators/subdag_operator.py
index 052095e2a6..90f17fcf6a 100644
--- a/airflow/operators/subdag_operator.py
+++ b/airflow/operators/subdag_operator.py
@@ -25,6 +25,18 @@
 
 
 class SubDagOperator(BaseOperator):
+    """
+    This runs a sub dag. By convention, a sub dag's dag_id
+    should be prefixed by its parent and a dot. As in `parent.child`.
+
+    :param subdag: the DAG object to run as a subdag of the current DAG.
+    :type subdag: airflow.DAG.
+    :param dag: the parent DAG for the subdag.
+    :type dag: airflow.DAG.
+    :param executor: the executor for this subdag. Default to use SequentialExecutor.
+        Please find AIRFLOW-74 for more details.
+    :type executor: airflow.executors.
+    """
 
     template_fields = tuple()
     ui_color = '#555'
@@ -37,18 +49,6 @@ def __init__(
             subdag,
             executor=SequentialExecutor(),
             *args, **kwargs):
-        """
-        This runs a sub dag. By convention, a sub dag's dag_id
-        should be prefixed by its parent and a dot. As in `parent.child`.
-
-        :param subdag: the DAG object to run as a subdag of the current DAG.
-        :type subdag: airflow.DAG.
-        :param dag: the parent DAG for the subdag.
-        :type dag: airflow.DAG.
-        :param executor: the executor for this subdag. Default to use SequentialExecutor.
-                         Please find AIRFLOW-74 for more details.
-        :type executor: airflow.executors.
-        """
         import airflow.models
         dag = kwargs.get('dag') or airflow.models._CONTEXT_MANAGER_DAG
         if not dag:


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services