airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [airflow] mik-laj commented on a change in pull request #5784: [AIRFLOW-4771] Initialization of hook in the GCP operator constructors
Date Mon, 12 Aug 2019 15:11:54 GMT
mik-laj commented on a change in pull request #5784: [AIRFLOW-4771] Initialization of hook
in the GCP operator constructors
URL: https://github.com/apache/airflow/pull/5784#discussion_r312976316
 
 

 ##########
 File path: airflow/contrib/operators/gcp_compute_operator.py
 ##########
 @@ -197,69 +232,104 @@ class GceSetMachineTypeOperator(GceBaseOperator):
         Defaults to False.
     :type validate_body: bool
     """
+
     # [START gce_instance_set_machine_type_template_fields]
-    template_fields = ('project_id', 'zone', 'resource_id', 'gcp_conn_id', 'api_version')
+    template_fields = (
+        "gcp_conn_id",
+        "project_id",
+        "zone",
+        "resource_id",
+        "api_version",
+    )
     # [END gce_instance_set_machine_type_template_fields]
 
     @apply_defaults
-    def __init__(self,
-                 zone,
-                 resource_id,
-                 body,
-                 project_id=None,
-                 gcp_conn_id='google_cloud_default',
-                 api_version='v1',
-                 validate_body=True,
-                 *args, **kwargs):
+    def __init__(
+        self,
+        zone,
+        resource_id,
+        body,
+        project_id=None,
+        gcp_conn_id="google_cloud_default",
+        api_version="v1",
+        validate_body=True,
+        *args,
+        **kwargs
+    ):
         self.body = body
         self._field_validator = None
         if validate_body:
             self._field_validator = GcpBodyFieldValidator(
-                SET_MACHINE_TYPE_VALIDATION_SPECIFICATION, api_version=api_version)
+                SET_MACHINE_TYPE_VALIDATION_SPECIFICATION, api_version=api_version
 
 Review comment:
   This looks like unrelated changes. Can you revert it?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message