[GitHub] [airflow] mik-laj commented on a change in pull request #5361: [AIRFLOW-4670] Make airflow/example_dags Pylint compatible
mik-laj commented on a change in pull request #5361: [AIRFLOW-4670] Make airflow/example_dags Pylint compatible URL: https://github.com/apache/airflow/pull/5361#discussion_r291818667 ## File path: airflow/example_dags/example_skip_dag.py ## @@ -30,21 +32,31 @@ # Create some placeholder operators class DummySkipOperator(DummyOperator): +"""Dummy operator which always skips the task.""" + ui_color = '#e8b7e4' def execute(self, context): raise AirflowSkipException -def create_test_pipeline(suffix, trigger_rule, dag): -skip_operator = DummySkipOperator(task_id='skip_operator_{}'.format(suffix), dag=dag) -always_true = DummyOperator(task_id='always_true_{}'.format(suffix), dag=dag) -join = DummyOperator(task_id=trigger_rule, dag=dag, trigger_rule=trigger_rule) -final = DummyOperator(task_id='final_{}'.format(suffix), dag=dag) +def create_test_pipeline(suffix, trigger_rule, dag_): +""" +Instantiate a number of operators for the given DAG. Review comment: Original content is rendered correctly: https://user-images.githubusercontent.com/12058428/59151971-ed45f800-8a3b-11e9-9a0f-b46933c7d346.png;> 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [airflow] mik-laj commented on a change in pull request #5361: [AIRFLOW-4670] Make airflow/example_dags Pylint compatible
mik-laj commented on a change in pull request #5361: [AIRFLOW-4670] Make airflow/example_dags Pylint compatible URL: https://github.com/apache/airflow/pull/5361#discussion_r291818634 ## File path: airflow/example_dags/example_skip_dag.py ## @@ -30,21 +32,31 @@ # Create some placeholder operators class DummySkipOperator(DummyOperator): +"""Dummy operator which always skips the task.""" + ui_color = '#e8b7e4' def execute(self, context): raise AirflowSkipException -def create_test_pipeline(suffix, trigger_rule, dag): -skip_operator = DummySkipOperator(task_id='skip_operator_{}'.format(suffix), dag=dag) -always_true = DummyOperator(task_id='always_true_{}'.format(suffix), dag=dag) -join = DummyOperator(task_id=trigger_rule, dag=dag, trigger_rule=trigger_rule) -final = DummyOperator(task_id='final_{}'.format(suffix), dag=dag) +def create_test_pipeline(suffix, trigger_rule, dag_): +""" +Instantiate a number of operators for the given DAG. Review comment: It's contains the empty line after description. https://user-images.githubusercontent.com/12058428/59151832-2b421c80-8a3a-11e9-90a7-b8a1581ab013.png;> I do not know why it is required, but the documentation without this line is not correctly rendered. I made a small change in http_operator.py to demonstrate problem. https://user-images.githubusercontent.com/12058428/59151959-c4bdfe00-8a3b-11e9-9f6c-38bb984b71bd.png;> I receive a error message: ``` /app/airflow/docs/_api/airflow/operators/http_operator/index.rst:36: WARNING: Unexpected indentation. /app/airflow/docs/_api/airflow/operators/http_operator/index.rst:37: WARNING: Block quote ends without a blank line; unexpected unindent. ``` 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [airflow] mik-laj commented on a change in pull request #5361: [AIRFLOW-4670] Make airflow/example_dags Pylint compatible
mik-laj commented on a change in pull request #5361: [AIRFLOW-4670] Make airflow/example_dags Pylint compatible URL: https://github.com/apache/airflow/pull/5361#discussion_r290228056 ## File path: airflow/example_dags/example_trigger_target_dag.py ## @@ -55,7 +57,11 @@ ) -def run_this_func(ds, **kwargs): +def run_this_func(**kwargs): +""" +Print the payload "message" passed to the DagRun conf attribute. Review comment: Empty line is required after method's description. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [airflow] mik-laj commented on a change in pull request #5361: [AIRFLOW-4670] Make airflow/example_dags Pylint compatible
mik-laj commented on a change in pull request #5361: [AIRFLOW-4670] Make airflow/example_dags Pylint compatible URL: https://github.com/apache/airflow/pull/5361#discussion_r290227855 ## File path: airflow/example_dags/example_skip_dag.py ## @@ -30,21 +32,31 @@ # Create some placeholder operators class DummySkipOperator(DummyOperator): +"""Dummy operator which always skips the task.""" + ui_color = '#e8b7e4' def execute(self, context): raise AirflowSkipException -def create_test_pipeline(suffix, trigger_rule, dag): -skip_operator = DummySkipOperator(task_id='skip_operator_{}'.format(suffix), dag=dag) -always_true = DummyOperator(task_id='always_true_{}'.format(suffix), dag=dag) -join = DummyOperator(task_id=trigger_rule, dag=dag, trigger_rule=trigger_rule) -final = DummyOperator(task_id='final_{}'.format(suffix), dag=dag) +def create_test_pipeline(suffix, trigger_rule, dag_): +""" +Instantiate a number of operators for the given DAG. Review comment: Empty line is required after method's description. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [airflow] mik-laj commented on a change in pull request #5361: [AIRFLOW-4670] Make airflow/example_dags Pylint compatible
mik-laj commented on a change in pull request #5361: [AIRFLOW-4670] Make airflow/example_dags Pylint compatible URL: https://github.com/apache/airflow/pull/5361#discussion_r290227977 ## File path: airflow/example_dags/subdags/subdag.py ## @@ -17,11 +17,21 @@ # specific language governing permissions and limitations # under the License. +"""Helper function to generate a DAG and operators given some arguments.""" + from airflow.models import DAG from airflow.operators.dummy_operator import DummyOperator def subdag(parent_dag_name, child_dag_name, args): +""" +Generate a DAG to be used as a subdag. Review comment: Empty line is required after method's description. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services