You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by jo...@apache.org on 2022/08/03 16:09:06 UTC

[airflow] 01/01: Correctly render parameters in Qubole operator docs

This is an automated email from the ASF dual-hosted git repository.

joshfell pushed a commit to branch qubole-api-doc-params
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 06a14e79e083b87e8ab5fe2d87fb364f37a54fc6
Author: Josh Fell <jo...@astronomer.io>
AuthorDate: Wed Aug 3 12:08:27 2022 -0400

    Correctly render parameters in Qubole operator docs
    
    Within the Pyhon API docs for both `QuboleCheckOperator` and `QuboleValueCheckOperator`, there are parameters improperly listed under a "kwargs" section. This could be confusing to users reading the docs as these are explicit inputs to these operators rather than catch-all keyword args.
---
 airflow/providers/qubole/operators/qubole_check.py | 39 ++++++++--------------
 1 file changed, 13 insertions(+), 26 deletions(-)

diff --git a/airflow/providers/qubole/operators/qubole_check.py b/airflow/providers/qubole/operators/qubole_check.py
index 950c0d62fc..8e41df2d0a 100644
--- a/airflow/providers/qubole/operators/qubole_check.py
+++ b/airflow/providers/qubole/operators/qubole_check.py
@@ -86,19 +86,15 @@ class QuboleCheckOperator(_QuboleCheckOperatorMixin, SQLCheckOperator, QuboleOpe
         :ref:`howto/operator:QuboleCheckOperator`
 
     :param qubole_conn_id: Connection id which consists of qds auth_token
+    :param results_parser_callable: This is an optional parameter to extend the flexibility of parsing the
+        results of Qubole command to the users. This is a Python callable which can hold the logic to parse
+        list of rows returned by Qubole command. By default, only the values on first row are used for
+        performing checks. This callable should return a list of records on which the checks have to be
+        performed.
 
     kwargs:
-
         Arguments specific to Qubole command can be referred from QuboleOperator docs.
 
-        :results_parser_callable: This is an optional parameter to
-            extend the flexibility of parsing the results of Qubole
-            command to the users. This is a python callable which
-            can hold the logic to parse list of rows returned by Qubole command.
-            By default, only the values on first row are used for performing checks.
-            This callable should return a list of records on
-            which the checks have to be performed.
-
     .. note:: All fields in common with template fields of
         QuboleOperator and SQLCheckOperator are template-supported.
 
@@ -138,28 +134,19 @@ class QuboleValueCheckOperator(_QuboleCheckOperatorMixin, SQLValueCheckOperator,
     is not within the permissible limit of expected value.
 
     :param qubole_conn_id: Connection id which consists of qds auth_token
-
     :param pass_value: Expected value of the query results.
-
-    :param tolerance: Defines the permissible pass_value range, for example if
-        tolerance is 2, the Qubole command output can be anything between
-        -2*pass_value and 2*pass_value, without the operator erring out.
-
-
+    :param tolerance: Defines the permissible pass_value range, for example if tolerance is 2, the Qubole
+        command output can be anything between -2*pass_value and 2*pass_value, without the operator erring
+        out.
+    :param results_parser_callable: This is an optional parameter to extend the flexibility of parsing the
+        results of Qubole command to the users. This is a Python callable which can hold the logic to parse
+        list of rows returned by Qubole command. By default, only the values on first row are used for
+        performing checks. This callable should return a list of records on which the checks have to be
+        performed.
 
     kwargs:
-
         Arguments specific to Qubole command can be referred from QuboleOperator docs.
 
-        :results_parser_callable: This is an optional parameter to
-            extend the flexibility of parsing the results of Qubole
-            command to the users. This is a python callable which
-            can hold the logic to parse list of rows returned by Qubole command.
-            By default, only the values on first row are used for performing checks.
-            This callable should return a list of records on
-            which the checks have to be performed.
-
-
     .. note:: All fields in common with template fields of
             QuboleOperator and SQLValueCheckOperator are template-supported.
     """