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 2021/11/25 10:18:02 UTC

[GitHub] [airflow] ephraimbuddy opened a new pull request #19824: Fix example code in Doc

ephraimbuddy opened a new pull request #19824:
URL: https://github.com/apache/airflow/pull/19824


   
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/main/UPDATING.md).
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on a change in pull request #19824: Fix example code in Doc

Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #19824:
URL: https://github.com/apache/airflow/pull/19824#discussion_r756817296



##########
File path: docs/apache-airflow/concepts/params.rst
##########
@@ -33,7 +33,7 @@ which won't be doing any such validations.
 
     with DAG(
       'my_dag',
-      params: {
+      params = {

Review comment:
       ```suggestion
         params={
   ```




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on pull request #19824: Fix example code in Doc

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #19824:
URL: https://github.com/apache/airflow/pull/19824#issuecomment-979220890


   The PR is likely ready to be merged. No tests are needed as no important environment files, nor python files were modified by it. However, committers might decide that full test matrix is needed and add the 'full tests needed' label. Then you should rebase it to the latest main or amend the last commit of the PR, and push it with --force-with-lease.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] uranusjr commented on pull request #19824: Fix example code in Doc

Posted by GitBox <gi...@apache.org>.
uranusjr commented on pull request #19824:
URL: https://github.com/apache/airflow/pull/19824#issuecomment-979073766


   How about making this conform to PEP 8 style? (four spaces, no space around parameter `=`)


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] uranusjr commented on a change in pull request #19824: Fix example code in Doc

Posted by GitBox <gi...@apache.org>.
uranusjr commented on a change in pull request #19824:
URL: https://github.com/apache/airflow/pull/19824#discussion_r756870233



##########
File path: docs/apache-airflow/concepts/params.rst
##########
@@ -32,21 +32,22 @@ which won't be doing any such validations.
     from airflow.models.param import Param
 
     with DAG(
-      'my_dag',
-      params: {
-        'int_param': Param(10, type='integer', minimum=0, maximum=20),          # a int param with default value
-        'str_param': Param(type='string', minLength=2, maxLength=4),            # a mandatory str param
-        'dummy_param': Param(type=['null', 'number', 'string'])                 # a param which can be None as well
-        'old_param': 'old_way_of_passing',                                      # i.e. no data or type validations
-        'simple_param': Param('im_just_like_old_param'),                        # i.e. no data or type validations
-        'email_param': Param(
-            default='example@example.com',
-            type='string',
-            format='idn-email',
-            minLength=5,
-            maxLength=255,
-        ),
-      }
+        'my_dag',
+        params={
+          'int_param': Param(10, type='integer', minimum=0, maximum=20),          # a int param with default value

Review comment:
       Increase indent here




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ephraimbuddy merged pull request #19824: Fix example code in Doc

Posted by GitBox <gi...@apache.org>.
ephraimbuddy merged pull request #19824:
URL: https://github.com/apache/airflow/pull/19824


   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] uranusjr commented on a change in pull request #19824: Fix example code in Doc

Posted by GitBox <gi...@apache.org>.
uranusjr commented on a change in pull request #19824:
URL: https://github.com/apache/airflow/pull/19824#discussion_r756894377



##########
File path: docs/apache-airflow/concepts/params.rst
##########
@@ -32,21 +32,22 @@ which won't be doing any such validations.
     from airflow.models.param import Param
 
     with DAG(
-      'my_dag',
-      params: {
-        'int_param': Param(10, type='integer', minimum=0, maximum=20),          # a int param with default value
-        'str_param': Param(type='string', minLength=2, maxLength=4),            # a mandatory str param
-        'dummy_param': Param(type=['null', 'number', 'string'])                 # a param which can be None as well
-        'old_param': 'old_way_of_passing',                                      # i.e. no data or type validations
-        'simple_param': Param('im_just_like_old_param'),                        # i.e. no data or type validations
-        'email_param': Param(
-            default='example@example.com',
-            type='string',
-            format='idn-email',
-            minLength=5,
-            maxLength=255,
-        ),
-      }
+        'my_dag',
+        params={
+            'int_param': Param(10, type='integer', minimum=0, maximum=20),          # a int param with default value
+            'str_param': Param(type='string', minLength=2, maxLength=4),            # a mandatory str param
+            'dummy_param': Param(type=['null', 'number', 'string'])                 # a param which can be None as well
+            'old_param': 'old_way_of_passing',                                      # i.e. no data or type validations
+            'simple_param': Param('im_just_like_old_param'),                        # i.e. no data or type validations
+            'email_param': Param(
+                default='example@example.com',
+                type='string',
+                format='idn-email',
+                minLength=5,
+                maxLength=255,
+            ),
+          },

Review comment:
       ```suggestion
           params={
               'int_param': Param(10, type='integer', minimum=0, maximum=20),  # a int param with default value
               'str_param': Param(type='string', minLength=2, maxLength=4),    # a mandatory str param
               'dummy_param': Param(type=['null', 'number', 'string'])         # a param which can be None as well
               'old_param': 'old_way_of_passing',                              # i.e. no data or type validations
               'simple_param': Param('im_just_like_old_param'),                # i.e. no data or type validations
               'email_param': Param(
                   default='example@example.com',
                   type='string',
                   format='idn-email',
                   minLength=5,
                   maxLength=255,
               ),
           },
   ```




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org